07-12-2017 06:27 AM
Few days ago I've seen nice "breakfast exercise" for the brain in one forum.
You have three separate booleans, which needs to be inverted, and you have the only two "NOT" primitives available. Also you can use any suitable amount of the "AND" and "OR" logic, but no "XOR" (and bundling into clusters or arrays also not allowed, of course). Start point:
This funny task coming from old school electronic, when engineers trying to use as less inverters as possible. You can easily found an answer in the Internet, but it is quite interesting to solve it (at least was for me).
Good luck!
07-12-2017 07:56 AM
Playing with NXG it seems!
07-12-2017 08:33 AM
@Andrey_Dmitriev wrote:
This funny task coming from old school electronic, when engineers trying to use as less inverters as possible.
Roy Scheider would have just said "We're gonna need a bigger FPGA". 😄
07-12-2017 09:16 AM - edited 07-12-2017 09:17 AM
07-12-2017 10:01 AM
@altenbach wrote:
I think one is enough 😄
No, it is still equivalent with three gates (also same with cluster).
Lets go back to 1952 and build computer.
This is your "AND":
This is "OR":
But this is "NOT":
So, you should spare one expensive triode and replace it with couple of cheap diodes.
07-12-2017 10:46 AM
I only go back half that far but there is some faint memory that tells me that NOR and NAND gates were used because they were cheaper than the AND and OR gates by a factor of an inverter at the output.
But I would think that in the spirit of the question you would want rule using NAND and NOR gates as well?
Ben
07-12-2017 11:11 AM
@Ben wrote:
But I would think that in the spirit of the question you would want rule using NAND and NOR gates as well?
A NOR A = NOT(A + A) = NOT(A)
That was simple!
07-12-2017 11:32 AM
@crossrulz wrote:
@Ben wrote:
But I would think that in the spirit of the question you would want rule using NAND and NOR gates as well?
A NOR A = NOT(A + A) = NOT(A)
That was simple!
Yes, it is. With NAND it will looks trivial like this:
Technically Ben is perfectly right, in the former time AND/OR/NAND/NOR was implemented like this - inversion is just resistors placement:
So, adding inversion to the AND or OR will spare one tube for dedicated inverter. But with Diode logic it was possible to replace tubes with diodes, but not for inversion - here you still need active element (tube or transistor). And our manager said - "save a money - the only two allowed".
07-12-2017 12:21 PM
And of course you can use unlimited amount of the compound arithmetic with three or more inputs:
But if you would like to invert input or output, then the only two inversions allowed::
or
07-12-2017 12:52 PM
I Cheated.... sorta
While I never had to trouble shoot logic gates made from pentodes, I did have to fix ones built from discrete diodes and transistors. That is when I asked "why NOR instead of OR?" which seemed much more simple to understand.
Forgive me if I am wrong but the answer using just two "NOT" and a mix of ANDs and ORs has not been answered?
If I had time I would draw up the Venn diagrams but I have to get in the truck and start a road trip.
Have fun!
Ben