News for hackers. Stuff that matters.
Re:A computer built from NOR gates: inside the Apollo Guidan... by not2b on Sunday September 29, 2019 @02:16PM (#21108662)
Back in the 1990s, UC Berkeley's computer hardware quals exam used to require the test taker to design a microcoded RISC processor out of NAND gates, from the bottom up. It was kind of like Little Alchemy, once you created every kind of primitive gate you needed, you could assemble them to make larger and larger things. This included building latches, registers, static RAM, bottom to top. NOR is just NAND with 0's and 1's reversed.
Re:A computer built from NOR gates: inside the Apollo Guidan... by fspeech on Sunday September 29, 2019 @10:20PM (#21111226)
NAND or NOR preference is due to the underlying transistor technology. NPN transistors (with electron majority carriers) tend to be stronger than PNP types (with hole majority carriers) at comparable sizes. In the beginning we had mostly bipolar processes, where we used NPN transistors in parallel to pull down the output and pull-ups were simply resistors. NOR gate was the natural configuration efficiency/cost wise. Later CMOS processes came along and we no longer use resistors for pull-ups (which tremendously reduces the quiescent current and makes CMOS perfect for digital logic). With CMOS it makes more sense to use the weaker PMOS (PNP) transistors in parallel for pull up and use the stronger NMOS (NPN) transistors in series for pull down and the natural configuration is the NAND gate.
Re:A computer built from NOR gates: inside the Apollo Guidan... by dfox on Monday September 30, 2019 @04:04AM (#21112758)
Preference for NAND and negative logic (ie. active low) do not stem from early CMOS, but from TTL. TTL NAND is same structure as invertor, only with multiple emitters on the input transistor. And with TTL significant current flows only in the low state, typical TTL gate sees undriven input as logic 1.

By the way for CMOS, NOR is somewhat counter-intuitively still preferable as the two series connected PMOS pull-up transistors can be collapsed into one dual-gate PMOS, which leads to more desirable gate geometry.

This is the reason why CMOS CD4000 is NOR (and without looking it up I don't even know what is the P/N of 4000-series 2-input NAND), while TTL SN7400 is NAND.

On the other hand in modern CMOS processes and particularly in CMOS VLSI design this distinction is mostly moot.

Re:A computer built from NOR gates: inside the Apollo Guidan... by fahrradflucht on Sunday September 29, 2019 @02:30PM (#21108755)
That is basically the premise of the awesome Nand2Tetris[0] book/project.

[0] https://www.nand2tetris.org/

Edit: Just saw that it is even referenced[1] in the article itself.

[1] https://www.righto.com/2019/09/a-computer-built-from-nor-gat...

Re:A computer built from NOR gates: inside the Apollo Guidan... by saagarjha on Sunday September 29, 2019 @03:19PM (#21109093)
One of the classes at my university had a tradition of a guest lecturer coming in and give a two hour talk on “building a computer with magnets” at the beginning of the quarter to incoming freshmen. He’d go through pretty much the same things you mentioned, combining smaller components as he went into more complex ones, culminating in a computer that could do a full fetch-decode-execute cycle (whimsically, powered by the turning of a water wheel).
Re:A computer built from NOR gates: inside the Apollo Guidan... by djhworld on Sunday September 29, 2019 @02:21PM (#21108698)
This is pretty much the approach I took a few months back after reading _But how do it Know?_ by J. Clark Scott, although I wrote it in software [1]

[1] https://medium.com/swlh/i-dont-know-how-cpus-work-so-i-simul...

Re:A computer built from NOR gates: inside the Apollo Guidan... by ip26 on Sunday September 29, 2019 @03:55PM (#21109285)
How much time did you have for this exam? Building a complete processor starting from gates is not exactly a thirty minute exercise, even with a minimal instruction set & narrow datapath.
Re:A computer built from NOR gates: inside the Apollo Guidan... by frostburg on Sunday September 29, 2019 @05:18PM (#21109676)
I recall having to do something similar for my "computer architecture" exam (in Italy) in very limited time (it was on paper during an oral examination), but I could get away with a very simple not-even-pipelining design.