Self learning about computers

MrAl

Joined Jun 17, 2014
13,704
As I see it, there are three (or four) options for building and learning about computers.

(1) Discrete digital logic
(2) Processor and memory, peripheral bus system
(3) single chip microcontroller
(4) ready built board system

With (3) and (4), the experience will focus more on programming rather than hardware.

In my opinion, (1) is very ambitious and tedious.
Option (2) is doable but components are becoming more and more difficult to get.

Option (3) is a very viable starting point which will provide a good path to embedded MCU applications.
Hi,

I've done all four.
#1 is the most interesting and i had to do that for a company i worked for, but it can be fun figuring out how to make the instruction decoder and what instructions you want to include. That might be the most fun part. You do need a way to program the FIRST rom though, so you can get it up and running.
#2 is also interesting, need to program the FIRST rom so you can use it as a bootloader with your home PC. The code for the bootloader is EXTREMELY simple.
#3 is modern, and quick. The PIC line of chips is really nice.
#4 is also modern, and quick. Many dev boards out there these days, more than i can count to i bet.

I was going to mention the solderless breadboards for #1 to 3, but somebody beat me to it.
 

MrAl

Joined Jun 17, 2014
13,704
Thanks for the replies everyone.

I think for now I'll just buy a beginners electronics book and work my way up from there. :)
Hi,

Oh you're welcome, and it is nice to see new people getting into this.
You can always come back here again when you get stuck and members here will be happy to help get you through it.

Good luck with your quest.
 

Thread Starter

JSM83

Joined May 19, 2023
12
I went to a library, looked up electronics books, skimmed through a few and choose one I liked to get me started. Bought it on amazon.

Digital Electronics Demystified - Myke Predko.

I'll read through that and jump off from there !! :)

Thanks for replies everyone :)
 

BobTPH

Joined Jun 5, 2013
11,516
If the idea was to design a computer at the level of its instruction set and implement it, an FPGA (using a development board) is actually the most practical option. I might just do this myself sometime. The upside is that you would actually have a useable device if you succeed.
 

dl324

Joined Mar 30, 2015
18,329
I’d like to learn how to make a computer on a breadboard.
While I don't particularly care for his style, cavalier attitude in handling IC's, or habit of hanging LEDs on the outputs of logic chips without current limiting resistors or concern for loading outputs, his circuit is somewhat instructional.

https://eater.net/8bit/

He sells kits, but I think you could save a lot of money by buying the parts on your own. I'd also convert the logic to CMOS. If you do that, take care when you need to interface to non-CMOS devices (such as whatever he uses to store the microcode).
 

WBahn

Joined Mar 31, 2012
32,847
If the goal (at least initially) is to get a really good feel for how a computer system works from top to bottom, then an excellent place to start is the Nand-To-Tetris project. While only done in emulation (though many people have build actual hardware implementations), you design all of the hardware (except the display and keyboard controllers) starting with nothing but 2-input NAND gates and D-type FFs. Then you write an assembler for it, then you write a virtual machine translator, then a compiler for a high-level object-oriented language, then the operating system. It's a one-semester course and is extremely carefully scoped. All of the software tools are free and easy to use, though pretty basic, and the book is only $40 new (and lots of used copies are floating around). Lots of people do it as a self-paced self-study course and there is a free Coursera course, too.
 

MrAl

Joined Jun 17, 2014
13,704
I went to a library, looked up electronics books, skimmed through a few and choose one I liked to get me started. Bought it on amazon.

Digital Electronics Demystified - Myke Predko.

I'll read through that and jump off from there !! :)

Thanks for replies everyone :)
Hello again,

Does that book contain a 'LAB' section that shows you experiments you can do to learn some hands-on experience?
If not, once you get through the book a little, you can get some parts like a 74LS93 (or a CMOS version) and an oscillator or pulse generator and try to get it going. You can look at the outputs with a meter if you have a slow pulse generator (1 pulse every 5 seconds maybe). If you have a higher frequency oscillator you will need an oscilloscope to see the output waveforms.
The 74LS93 (or equivalent) is used for the address counters. As the clock oscillator pulses the device, it counts up in binary, and that is used to address the ROM and the RAM, and also the I/O ports once you get them going. First thing though, you have to understand how the 74LS93 binary counter works. As each clock pulse reaches the device clock input, the four outputs change states in the order of a binary count:
0000 (0)
0001 (1)
0010 (2)
0011 (3)
0100 (4)
0101 (5)
0110 (6)
0111 (7)
1000 (8)
1001 (9)
1010 (10)
1011 (11)
1100 (12)
1101 (13)
1110 (14)
1111 (15)

As you can see, this counter only goes from 0 to 15, which would mean only 15 different addresses would be possible, By connecting another one to the first, you can go from 0 to 256. With two more, you can go 0 to 65535, which means you are up to a lot more possible addresses in ROM or RAM now.
Often the highest order bit is used to switch between ROM and RAM. That gives you 0 to 32767 for ROM and 0 to 32767 for RAM.
You should probably use synchronous binary counters though if you intend to go that high in address space. You can look those part numbers up. Synchronous counters will not produce the glitches that regular asynchronous counters inherently produce. This will keep the memory space addressing clean and reliable.

I am assuming you are going with discrete logic like the 74LS00 series TTL or CMOS. Max frequency will be around 20MHz with standard TTL, maybe higher with more advanced TTL, but you will still be limited by the max frequency of the ROM and RAM. It is possible to get up to 100MHz, but it takes some special care.

Since this will be your first design, I would start with maybe a 1MHz clock and go from there. Because you will also be developing software for it, i recommend incorporating a single step mechanism. This will allow you to troubleshoot the code one instruction at a time. To implement that, you use a clock that comes from a push button switch that is debounced so you can generate one single clock pulse at a time. It's not that hard to do. Once you get the code working, you can switch back to the 1MHz clock or whatever you want to use.

You may want to mention what kind of test equipment you have on hand also. You may have to invest in some test equipment for testing the construction.
You also want to get some LEDs as these can really help a lot to identify the digital outputs of various chips even the address counters if you like. You'll also need current limiting resistors.

I think you have a long road ahead of you but that's what this stuff is all about: gaining some hands-on experience.
 
Last edited:

Thread Starter

JSM83

Joined May 19, 2023
12
If the goal (at least initially) is to get a really good feel for how a computer system works from top to bottom, then an excellent place to start is the Nand-To-Tetris project. While only done in emulation (though many people have build actual hardware implementations), you design all of the hardware (except the display and keyboard controllers) starting with nothing but 2-input NAND gates and D-type FFs. Then you write an assembler for it, then you write a virtual machine translator, then a compiler for a high-level object-oriented language, then the operating system. It's a one-semester course and is extremely carefully scoped. All of the software tools are free and easy to use, though pretty basic, and the book is only $40 new (and lots of used copies are floating around). Lots of people do it as a self-paced self-study course and there is a free Coursera course, too.
Yeahhhhhhh that sounds like something worth a shot.

Thank you
 

MrAl

Joined Jun 17, 2014
13,704
Yeahhhhhhh that sounds like something worth a shot.

Thank you
Hi,

See post #29.
If you intend to use NOR and NAND gates you are going to be doing this forever. Not only that, it's going to take a truck load of IC chips.
At least go with some slightly higher level chips like counters and decoders.
 

WBahn

Joined Mar 31, 2012
32,847
Hi,

See post #29.
If you intend to use NOR and NAND gates you are going to be doing this forever. Not only that, it's going to take a truck load of IC chips.
At least go with some slightly higher level chips like counters and decoders.
I specifically pointed out that it is done in emulation -- no hardware. The physical implementations that people do are almost always done using FPGAs.

The approach is very hierarchical. First the user builds the basic gates from NAND gates. Then they use those gates to build slightly more complex gates, such as multiplexers and demultiplexers and half adders and full adders. Then they use those gates to build an ALU. Then they use some gates and a single DFF to built a 1-bit register. Then they use that to build a 16-bit register. Then they use a few of those to built a register with 8 words. In a few minutes, they have the a 16 KW RAM. They then make a program counter followed by the CPU and then, finally, the entire computer.

The entire build can be done in as little as a couple hours if you are comfortable with digital logic. If that is new to you, then it is takes longer. This is done in four chapters (plus a fifth to introduce you to the instruction set architecture before you build the CPU and final machine). The pace of the course is aimed at one chapter a week (total of twelve chapters).
 
Last edited:

ScottWang

Joined Aug 23, 2012
7,501
I think you can check the chip 74LS181 --
The SN54/74LS181 is a 4-bit Arithmetic Logic Unit (ALU) which can perform all the possible 16 logic, operations on two variables and a variety of arithmetic operations.
 

MrAl

Joined Jun 17, 2014
13,704
I specifically pointed out that it is done in emulation -- no hardware. The physical implementations that people do are almost always done using FPGAs.

The approach is very hierarchical. First the user builds the basic gates from NAND gates. Then they use those gates to build slightly more complex gates, such as multiplexers and demultiplexers and half adders and full adders. Then they use those gates to build an ALU. Then they use some gates and a single DFF to built a 1-bit register. Then they use that to build a 16-bit register. Then they use a few of those to built a register with 8 words. In a few minutes, they have the a 16 KW RAM. They then make a program counter followed by the CPU and then, finally, the entire computer.

The entire build can be done in as little as a couple hours if you are comfortable with digital logic. If that is new to you, then it is takes longer. This is done in four chapters (plus a fifth to introduce you to the instruction set architecture before you build the CPU and final machine). The pace of the course is aimed at one chapter a week (total of twelve chapters).
Hi,

Yes, that's quite different.
Back in the 1980's I did a JK Master/Slave Flip Flop using an LM339...

JK Master/Slave FF

That site has other digital circuits also.
 
Top