Live data from Hacker News

MyNOR: Single board computer that uses a single NOR gate as its ALU

mynor.org

1–10 of 70 posts

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#2
I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation.

How could a NOR gate do one bit addition?

Add two bits ... XOR ... NOR

0 + 0 = 0...........0...........1

0 + 1 = 1...........1...........0

1 + 0 = 1...........1...........0

1 + 1 = 0...........0...........0

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#4

I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0

NOR (like NAND) is a universal logic gate. You can build any other logic gate out of just NORs.

For this ALU, you’d presumably write a subroutine that computed XORs in terms of NORs, and then use that as a primitive for building an adder.

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#5

I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0

From the website: http://www.mynor.org/downloads/NOR-Logic.pdf

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#6

I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0

NOR (like NAND) is a universal logic gate. You can build any other logic gate out of just NORs. For this ALU, you’d presumably write a subroutine that computed XORs in terms of NORs, and then use that as a primitive for building an adder.

Yes, but this thing advertises that it uses a single NOR gate as an ALU.

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#7

I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0

http://www.mynor.org/downloads/MyNOR-HowItWorks.pdf has some more info.

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#8

I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0

The nor gate (like nand) is a universal gate. You can implement all the other gate with a combination of nor gate. See https://en.m.wikipedia.org/wiki/NOR_logic#XOR for example.

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#9
post #6

Earlier quoted context omitted.

NOR (like NAND) is a universal logic gate. You can build any other logic gate out of just NORs. For this ALU, you’d presumably write a subroutine that computed XORs in terms of NORs, and then use that as a primitive for building an adder.

Yes, but this thing advertises that it uses a single NOR gate as an ALU.

That’s just moving the composition between hardware and software - the equivalence still applies. I can build any logic (software) function out of a function that evaluates NOR.

Re: MyNOR: Single board computer that uses a single NOR gate as its ALU

#10

I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0

I think the idea is that you use registers and apply the NOR gate multiple times. In this sense the NOR gate is universal, while an OR gate nor a XOR gate are neither universal.

I.e.

  XOR(x,y) = NOR(0, NOR(NOR(x,y), NOR(NOR(x,0),NOR(y,0)))))
(maybe not the most minimal version and maybe even wrong)
Post reply on HN