BUS

We need to make multiple registers, ALUs, RAM, the Clock, and other circuits to communicate with each other. For example, the ALU needs to load data from a register, but we also must put values from the RAM into the register. SN74LS373 has 8 input and 8 output pins, and so does HY6116. Our ALU SN74LS181 has 4 input and 4 output pins, but if we link 2 together we will have again 8 input and 8 output. We will have 4 SN74LS373 registers. So we will create a shared highway between all the chips, called a "BUS" - it is literally a bunch of wires. In our case, we will use 4 wires. There are many buses in one computer: an address bus, control bus, data bus. In modern computers, you have PCI bus, ISA bus, IO bus, etc.

There can be only one thing driving the bus, meaning driving each wire HIGH or LOW, because otherwise they will conflict. Some of the chips we use have a floating state, meaning they just disconnect their outputs. For example, 74LS373 has it, but 74S189 does not, 74LS181 does not have floating state either. 74LS245 however is a chip that allows us to "disconnect" one side of it from the other and control when to "release".

The important ones for us are Control Bus, Address Bus and Data Bus.

  • Control Bus: The control bus sends instructions, like a boss, guiding each component on what to do. It decides when a register should capture data or when the ALU should add values. Commands like "Read/Write," "Clock pulses," or "Interrupts" move through it, telling every part exactly when and how to act.

  • Address Bus: The address bus is like a map, letting the CPU point to specific spots in memory. It's how the CPU finds exactly where to place or grab data. So, when the CPU needs something, it "sends" an address here, directing RAM or storage to a precise location.

  • Data Bus: This is where the real action happens. Data flows across it, but only one component can speak at a time, and the rest just listen. In our 8-bit setup, each register, the RAM, and the ALU can communicate with one another here, one at a time, keeping everything in sync.

An 8-bit bus is literally 8 wires.

This is a drawing of a 4-bit data bus. We have the registers there, the ALU and the RAM's output. I have not put the 74LS245 transceivers there for simplicity. For example, if we want to load a value from RAM into register A, we will connect the RAM row and column decoders to the address bus, we will "write" an address there, and then the RAM's output will be on the data bus. We will enable register A for writing and will enable C, and magically, the value from RAM will be in register A.

                           Data Bus (4 bits)
                           D3 D2 D1 D0
                           |  |  |  |
                           |  |  |  |
                           |  |  |  | 
                  R   Q0 --+  |  |  |
                  E   Q1 -----+  |  |
                  G   Q2 --------+  |
     ------>  C   I   Q3 -----------+
     ------>  OC  S        |  |  |  |
                  T   D0 --+  |  |  |
                  E   D1 -----+  |  |
                  R   D2 --------+  |
                  A   D3 -----------+
                          |  |  |  |
                           |  |  |  |
                  R   Q0 --+  |  |  |
                  E   Q1 -----+  |  |
                  G   Q2 --------+  |
     ------>  C   I   Q3 -----------+
     ------>  OC  S        |  |  |  |
                  T   D0 --+  |  |  |
                  E   D1 -----+  |  |
                  R   D2 --------+  |
                  B   D3 -----------+
                           |  |  |  |
                           |  |  |  |
                      A0 --+  |  |  |
                      A1 -----+  |  |
      ------> S0      A2 --------+  |
      ------> S1  A   A3 -----------+
      ------> S2  L        |  |  |  |
      ------> S3  U   F0 --+  |  |  |
                      F1 -----+  |  |
                      F2 --------+  |
                      F3 -----------+
                           |  |  |  |
                           |  |  |  |
                           |  |  |  |
      ------> A0     IO0 --+  |  |  |
      ------> A1  R  IO1 -----+  |  |
      ------> A2  A  IO2 --------+  |
      ------> A3  M  IO3 -----------+
      ------> CS           |  |  |  |
      ------> OE           |  |  |  |

Don't stress - everything is just switches, wires and infinite loops. There is no such thing as an address, it's just wires with voltage or not.