Implement 'AND' function with 'XOR' function. tal Member Posts: 97 Threads: 87 Joined: Jan 1970 12-12-2000, 01:46 AM Hi, everybody! I appreciate it if someone could tell me how to implement 'AND' function with 'XOR' function. Best regards, Tal email: td@chem.ch.huji.ac.il Tom (UK) Senior Member Posts: 298 Threads: 35 Joined: Jan 1970 12-12-2000, 07:37 AM I'm almost 100% sure you can't. The XOR function can't tell the difference between '1,1' and '0,0' at it's inputs. Inverting the inputs/output in whatever combination makes a new gate with an XOR or XNOR function. You can of course make and AND function from the following: A AND B = NOT(A) NOR NOT(B) This is not as silly as it seems as in transistor logic a NOR gate can be smaller/faster than an AND gate (which is made from an NAND gate followed by an inverter). Please feel free to correct me on any of the above if I have made an error. Joe Panico Member Posts: 78 Threads: 6 Joined: Jan 1970 12-12-2000, 10:57 PM Tal, What are you up to now ??????????? Joe John Kono Junior Member Posts: 17 Threads: 3 Joined: Sep 2005 12-13-2000, 03:48 AM It can also be accomplished with an OR and two XORs. ``` | = OR ^ = XOR x ^ y ^ (x | y) ``` The logical reason an OR is required is that an XOR is derived from two ANDs, two NOTs, and an OR (or a logical equivalent thereof): ``` (x & !y) | (!x & y) ``` So, if an AND is desired, the OR must be factored out which, of course, requires an OR operation. Steve (Australia) Member Posts: 241 Threads: 29 Joined: Jan 2008 12-13-2000, 05:55 AM If you were to bu trying to build an AND function from XOR gates, then it is indeed possible. Imagine an XOR gate with one input held in a logic 1 state. The gate then acts as an inverter. Similarly, if the input is held low it acts as a non-inverting buffer. Using an additional 2 diodes, and a resistor allows you to "wire-AND" the outputs of two buffers, and then buffer the output. Depending on the nature of the surrounding logic, you could even dispense with the XOR gates :-) « Next Oldest | Next Newest »

 Possibly Related Threads... Thread Author Replies Views Last Post HP50g: Writing a function that returns a function Chris de Castro 2 1,648 12-10-2013, 06:49 PM Last Post: Han IFERR function on HP Prime Mic 2 1,456 12-02-2013, 01:33 AM Last Post: cyrille de Brébisson HP Prime: Dirichlet's eta function recognized but not numerically evaluated Helge Gabert 0 894 11-16-2013, 03:41 PM Last Post: Helge Gabert Possible bug with sqrt function in the HP prime Michael de Estrada 6 1,868 11-15-2013, 12:49 PM Last Post: Michael de Estrada HP-41 MCODE: The Last Function - at last! Ángel Martin 0 812 11-08-2013, 05:11 AM Last Post: Ángel Martin [Prime] any ideas for a undo function? Stefan Dröge (Germany) 8 2,266 11-04-2013, 04:37 PM Last Post: Damien HP Prime 'where' function bluesun08 11 2,727 10-29-2013, 06:56 PM Last Post: Joe Horn HP Prime - Defining a function bluesun08 5 1,816 10-23-2013, 02:43 PM Last Post: Han How to save the definition of a CAS program or CAS function ? dg1969 3 1,260 10-19-2013, 01:48 PM Last Post: dg1969 HP PRIME Function parameters steindid 2 1,152 10-11-2013, 10:20 AM Last Post: steindid

Forum Jump: