News for hackers. Stuff that matters.
Re:MyNOR: Single board computer that uses a single NOR gate ... by JPLeRouzic on Tuesday November 24, 2020 @03:17AM (#25196386)
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 ... by dvdkhlng on Tuesday November 24, 2020 @03:28AM (#25196453)
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)
Re:MyNOR: Single board computer that uses a single NOR gate ... by ant6n on Tuesday November 24, 2020 @04:36AM (#25196820)
Fun logic tongue twister: Neither an or gate nor an xor gate are universal
Re:MyNOR: Single board computer that uses a single NOR gate ... by apetersonBFI on Tuesday November 24, 2020 @08:27AM (#25198214)
Any expression or series of gates of only ORs has the non-decreasing property, changing an input from 0 to 1 can never change the result from 1 to 0. So you can't implement any gate that needs that using ORs.

Similarly, any collection of XOR gates is simply a summation mod 2.

Re:MyNOR: Single board computer that uses a single NOR gate ... by captn3m0 on Tuesday November 24, 2020 @03:25AM (#25196430)
Re:MyNOR: Single board computer that uses a single NOR gate ... by JPLeRouzic on Tuesday November 24, 2020 @04:22AM (#25196742)
Thanks but in the linked PDF they use 12 NOR gates for a ONE bit adder.
Re:MyNOR: Single board computer that uses a single NOR gate ... by rrobukef on Tuesday November 24, 2020 @05:46AM (#25197244)
Then you need at most 12 registers for a one-bit adder.
Re:MyNOR: Single board computer that uses a single NOR gate ... by dzamlo on Tuesday November 24, 2020 @03:28AM (#25196451)
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 ... by OJFord on Tuesday November 24, 2020 @04:02AM (#25196629)
Not with a 'single NOR gate'.
Re:MyNOR: Single board computer that uses a single NOR gate ... by pjc50 on Tuesday November 24, 2020 @04:11AM (#25196676)
Yes .. if you feed its output to its input on the next cycle.
Re:MyNOR: Single board computer that uses a single NOR gate ... by JPLeRouzic on Tuesday November 24, 2020 @04:30AM (#25196793)
Then the ALU includes the sequencer and the microprogram.

Shifts are implemented with look-up tables.

Anyway it's a beautiful work.

Re:MyNOR: Single board computer that uses a single NOR gate ... by theresistor on Tuesday November 24, 2020 @03:25AM (#25196424)
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 ... by pmiller2 on Tuesday November 24, 2020 @03:26AM (#25196436)
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 ... by theresistor on Tuesday November 24, 2020 @03:28AM (#25196452)
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 ... by pmiller2 on Tuesday November 24, 2020 @03:59AM (#25196615)
False advertising, then, IMO.
Re:MyNOR: Single board computer that uses a single NOR gate ... by srott on Tuesday November 24, 2020 @04:35AM (#25196816)
No, AFAIU the computation is serialized, driven by the microcode and this gate is reused for every step
Re:MyNOR: Single board computer that uses a single NOR gate ... by garmaine on Tuesday November 24, 2020 @04:22AM (#25196740)
...but that's exactly the claim, restated.
Re:MyNOR: Single board computer that uses a single NOR gate ... by pmiller2 on Tuesday November 24, 2020 @05:02AM (#25197011)
Not really. It's completely trivial, if extremely slow (which the article acknowledges) to emulate an ALU in software, with access to a single, universal hardware gate. Why don't they just say "we put a NOR gate on a chip, then added all this other stuff (RAM, boot EEPROM, etc.) to make it function as a computer." That would, at least, be a non-misleading statement of the claim.
Re:MyNOR: Single board computer that uses a single NOR gate ... by magicalhippo on Tuesday November 24, 2020 @03:58PM (#25202940)
Yes, it's a "Single board computer with 20 ICs, and a single-gate ALU".

To me it's not really an ALU either, since the NOR gate doesn't really do the job I expect from an ALU.

Re:MyNOR: Single board computer that uses a single NOR gate ... by garmaine on Tuesday November 24, 2020 @04:16PM (#25203081)
That’s how I interpreted the OP though... I really don’t know what you were reading into it.
Re:MyNOR: Single board computer that uses a single NOR gate ... by amenghra on Tuesday November 24, 2020 @03:27AM (#25196445)