Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Xor linked list


  
  XOR linked list - Wikipedia, the free encyclopedia
XOR linked lists are a curious use of the bitwise exclusive disjunction (XOR) operation to decrease storage requirements for doubly-linked lists.
When you traverse the list from left to right: supposing you are at B, you can take the address of the previous item, A, and XOR it with the value in the XOR field.
Where it is still desirable to reduce the overhead of a linked list, unrolling provides a more practical approach (as well as other advantages, such as increasing cache performance and speeding random accesses).
en.wikipedia.org /wiki/Xor_linked_list   (401 words)

  
 Exclusive disjunction - Wikipedia, the free encyclopedia
Exclusive disjunction, also known as exclusive or and symbolized by XOR or EOR, is a logical operation on two operands that results in a logical value of true if and only if one of the operands, but not both, has a value of true.
In view of the isomorphism between addition modulo 2 and exclusive disjunction, it is clear that XOR is both an associative and a commutative operation.
XOR is also used to detect an overflow in the result of a signed binary arithmetic operation.
en.wikipedia.org /wiki/Exclusive_disjunction   (851 words)

  
 ipedia.com: Linked list Article   (Site not responding. Last check: 2007-10-07)
Linked lists sometimes have a special dummy or sentinel node at the beginning and/or at the end of the list, which is not used to store data.
Linked lists are used as a building block for many other data structures, such as stacks, queues and their variations.
Linked lists can also save memory in applications that need one or more lists of unpredictable size, since the total space used will be proportional to the number of elements actually present in all lists (as opposed to the number of lists times the maximum size of each list).
www.ipedia.com /linked_list.html   (3614 words)

  
 Exclusive disjunction - Wikipedia, the free encyclopedia
Because xor is associative, the order of the inputs does not matter: the same result will be obtained regardless of order.
The xor operation is sometimes used as a simple mixing function in cryptography, for example, with one-time pad or Feistel network systems.
In digital logic design, a two-input xor logic gate is often thought of as a programmable inverter, in that if one input is held at a logic '1', the output will be the inverse of the other input.
www.encyclopedia-online.info /XOR   (584 words)

  
 List of data structures: Facts and details from Encyclopedia Topic   (Site not responding. Last check: 2007-10-07)
A skip list is a probabilistic data structure, based on parallel linked lists, with efficiency comparable to a binary search tree (order o(log n)...
An unrolled linked list is a variation on the linked list which stores multiple elements in each node....
In graph theory, an adjacency list is the representation of all edges or arcs in a graph as a list....
www.absoluteastronomy.com /encyclopedia/l/li/list_of_data_structures.htm   (1831 words)

  
 Definition of Xor
The exclusive disjunction of propositions A and B is usually called A xor B, where "xor" stands for "exclusive or" and is pronounced "eks-or" or "zor".
(A xor B) ⇔ (A and not B) or (not A and B) ⇔ (A or B) and (not A or not B) ⇔ (A or B) and not (A and B)
Because xor is associative, the order of the inputs does not matter: the same result will be obtained regardless of association.
www.wordiq.com /definition/Xor   (685 words)

  
 List of data structures - Wikipedia, the free encyclopedia
For a wider list of terms, see list of terms relating to algorithms and data structures.
Other structures such as "linked list" and "stack" cannot easily be defined this way because there are specific operations associated with them.
This page was last modified 08:11, 10 April 2006.
en.wikipedia.org /wiki/List_of_data_structures   (105 words)

  
 [No title]
Linked Lists in ASM by mammon_ Assembly language is notorious for being low-level; to wit, it lacks many of the features in higher-level languages which make programming easier.
The linked list implementation has been designed to be extendable; the routine names are prefaced with underscores to avoid filling up the namespace of the linked list application, and the routines themselves are generic enough to be called from higher-level Stack, Queue, and List implementations.
The Linked List interface is as follows: ptrHead _create_list(hHeap, NodeSize) void _delete_list(hHeap, ptrHead) ptrNode _add_node(hHeap, ptrPrev, NodeSize) void _delete_node(hHeap, ptrPrev, ptrNode) void _set_node_data(ptrNode, NodeOffset, data) DWORD data _get_node_data(ptrNode, NodeOffset) The names of the routines should make their intent apparent; note however that NodeSize is assumed to be the size of a LISTSTRUCT structure.
www.eccentrix.com /members/mammon/Text/llist_apj.txt   (892 words)

  
 Binary Alchemy » Blog Archive » Xor tricks   (Site not responding. Last check: 2007-10-07)
The first xor swap trick is meant for swapping two arbitrary values, but occasionally you want to swap back and forth between two specific values.
The idea here is if we have a linked list that we want to traverse in either direction, usually we use backward and forward pointers in each node.
The main advantage of this is it reduces the linked list node overhead from two pointers to just one.
www.alkemio.org /wordpress/2005/12/24/xor-tricks   (391 words)

  
 Exclusive or -   (Site not responding. Last check: 2007-10-07)
Exclusive or (usual symbol XOR occasionally EOR), which is sometimes called exclusive disjunction, is a logical operator that results in true if one of the operands, but not both of them, is true.
In the C programming language and Java programming language, a caret ("^") is used as both a logical and bitwise XOR operator.
This is not used outside of programming contexts because it would create confusion; in logic, the caret is often used for the and operation and on calculators it usually denotes exponentiation.
psychcentral.com /psypsych/Xor   (1214 words)

  
 [No title]
An alphabetic * \ * list is a set of sublists where each sublist is a linked list * \ * of nodes with alphanumeric identification and in alphabetic * \ * order.
An alphabetic list is a set of sublists where each sublist is a linked list of nodes with alphanumeric identification and in alphabetic order.
An alphabetic list is not sorted but the output is. This is the method I use for putting all goodies in order.
home.earthlink.net /~neilbawd/alphlist.txt   (3139 words)

  
 Linked Lists
I also would like to see perhaps a kernel option to have memory-efficient doubly linked lists (among other things) if possible because I want to get my Aquapad running a lean, mean, optimized kernel.
I could have made an actual function for that, but it would have been silly to do that because the lines are so darn small; setting up the call to the function, passing the parameters, and passing back the return value would have chewed up more code than I would have liked.
Xor just flips bits in the first value as specified in the second.
rumkin.com /reference/algorithms/linked_list   (1431 words)

  
 CSCI 2720 - Project 1   (Site not responding. Last check: 2007-10-07)
The implementation of linked lists is described in detail in the Lewis and Denenberg text.
All of the existing list elements are copied to the new array, and the old array is destroyed.
It's also a good practice to list preconditions (set of conditions on the input to the function in order for the function to behave properly) and postconditions (how the input arguments will be modified upon exit, what will be returned) for each function.
www.cs.uga.edu /~windsor/csci2720_SP01/proj1.html   (1171 words)

  
 1
In a doubly-linked list, the data node contains two pointers, one for traversing to the top of the list, and another for traversing to the bottom of the list.
Figure 2 shows a link list node with pointer S that is the XOR of reference A (before) and reference B(after).
To traverse the link list upward, the program XORs the current pointer (S) with the one it just left (B), and the result is the pointer of the next node (A).
www.carolla.com /quantum/QuantumComputers.htm   (4488 words)

  
 Examples of Software Patents
This list comprises both a sampling of software patents chosen more or less at random, and a number of famous software patents.
Dynamically linking a replacement procedure into a running program by rewriting a call instruction to point to the new procedure.
Quicksort implemented using a linked list of pointers to the objects to be sorted.
www.gordoni.com /software-patents/examples.html   (796 words)

  
 PGSDK Programmer's Manual   (Site not responding. Last check: 2007-10-07)
A selection list is a linked list of objects selected by the user.
Selection Lists are the application's equivalent data structures that you can use to keep track of and manage objects in the graph.
In summary, the selection lists and selection items allow your application to determine which object(s) are selected in a chart and, based on your requirements, perform an action on one, all, or selected items in the list.
www.threedgraphics.com /pg_sdk/doc/pgsdk_6.htm   (2566 words)

  
 sci.crypt: [OT] Linked list fixup [was: Fast DES IP]
--- We have a non-empty linked list in RAM, of unknown size n, and a pointer to the head node.
Instead of nicely ending with a node having a NULL "next" field, the list is "loopy" and the last node in the list has a "next" field that points to some unknown node in the list.
Nope - tcl lists are not implemented as linked lists,...
www.derkeiler.com /Newsgroups/sci.crypt/2004-12/0412.html   (462 words)

  
 [No title]
The address of the list must be passed in ES.
; The address of the linked list structure is passed in ES ; Note: ES is not changed by this proc.
get_data_size proc xor DI, DI ; ES:DI points to size variable mov CX, ES:[DI] ; CX = size of data buffer in bytes ret get_data_size endp ; This proc accepts a pointer to the linked list and a pointer ; to a data buffer to match.
slicer69.tripod.com /code/asm/unit.txt   (1844 words)

  
 C/C++ | Lingfa Yang
A doubly linked list: Advantage: operations are easily to implement; both directions.
Stack Model: A stack is a list with the restriction that insertion s and deletions can be performed in only one position, namely, top, based on the principle of Last In First Out (LIFO).
List-like structures (list, stack, or queue) are excellent if you have a relative small data volume, and you need sequential record-processing capabilities.
hopf.chem.brandeis.edu /yanglingfa/cpp/c_cpp.html   (4108 words)

  
 Microsoft Interview Questions
Implement an algorithm to sort a linked list.
Implement an algorithm to reverse a linked list.
Implement an algorithm to insert a node into a circular linked list without traversing it.
www.sellsbrothers.com /fun/msiview/default.aspx?content=question.htm   (1980 words)

  
 [No title]
;**************************************************************** ;* * ;* LLIST.ASM -- Linked List Example * ;* * ;**************************************************************** ;* Author: Gene Apperson * ;* Copyright 2002, Gene Apperson * ;**************************************************************** ;* Module Description: * ;* * ;* This is a design example for use in EE-314.
; head of list _DATA ends ; ;**************************************************************** subttl page ;**************************************************************** _TEXT segment assume cs:_TEXT ; ; main ; ; This procedure is a test harness to test the operation of ; the linked list subroutines.
This requires special handling ldel40: or di,di jnz ldel50 ; ; The node being deleted is the head of the list.
moab.eecs.wsu.edu /~ee314/examples/llist.asm   (228 words)

  
 The Aggregate Magic Algorithms   (Site not responding. Last check: 2007-10-07)
Normally, a dual-linked circular list would contain both previous and next pointer fields and the current position in the list would be identified by a single pointer.
The value stored in each node is the XOR of the next and previous pointers that normally would have been stored in each node.
Unfortunately, using this trick in C is awkward because the XOR operation is not defined for pointers.
aggregate.org /MAGIC   (2603 words)

  
 Dan's cs50 Challenge Problem Page   (Site not responding. Last check: 2007-10-07)
In assignment 6, you explored how to implement doubly-linked lists using two pointers- a pointer to the previous element of the list and a pointer to the next.
However, it turns out that this is not necessary; with some cleverness, you can devise a doubly-linked list data structure that only has one link, and yet allows traversal along the list in either direction (in effect, all the generality of a doubly-linked list).
Challenge: Describe (in sufficient detail that someone could implement something according to your description) a linked list data structure that allows traversal in both directions, but only requires one "link" instead of two.
www.eecs.harvard.edu /~ellard/CS50-96/challenge.html   (478 words)

  
 The C Programming Language
Enciphers or deciphers a file using a cumulative xor formula.
Reads a sequence of observations (real numbers) and prints the deviation of each observation from the mean.
Sorts a list of numbers using the merge-sort algorithm.
www.cs.tau.ac.il /~wein/courses/C   (678 words)

  
 HEMANTH & GARY CRACKED THE INTERVIEW   (Site not responding. Last check: 2007-10-07)
Write a C program to detect a loop in a linked list.
Write a C program to create a copy of a linked list.
Write a C program to return the nth node from the end of a linked list.
www.eng.buffalo.edu /~hs37/Docs/InterviewTips.html   (2364 words)

  
 [No title]
The illustration was generated with a simple QBASIC program which also prints a list of address offsets in order generated from chunk pointer value and sorted by offset value with distance between offsets.
Normally the buffer list would be spread out through memory as new buffers are created in the dictionary and old buffers are destroyed with matches and fail-to's used to search the list.
the buffer at the end of the list is probably the best candidate for swapping out to virtual memory.
www.piclist.com /techref/language/meta-l   (4057 words)

  
 Don Schwarz   (Site not responding. Last check: 2007-10-07)
I’ve had a certain fascination with interesting uses of the exclusive disjunction (XOR) operator for quite a while.
In particular, XOR Linked Lists have always seemed like a really cool hack, even if they are no longer very useful in this day of dirt -cheap memory.
In particular, we can implement an XOR Linked List.
don.schwarz.name /index.php?m=200502   (1227 words)

  
 Digital Mars - The D Programming Language
This section lists some of the more interesting features of D that set it apart from C and C++.
This operation is equivalent to doing a memcpy() of a static version of the object onto the newly allocated one, although more advanced compilers may be able to optimize much of this away.
Interfaces describe a list of functions that a class that inherits from the interface must implement.
www.yak.net /pub/tmp/d.html   (15132 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.