What's a Bus?
Introduction
A bus consist of 1 or more wires. There's usually a bus that
connects the CPU to memory and to disk and I/O devices. Real
computers usually have several busses, even though the simple computer
we have modeled only has one bus where we consider the data bus, the
address bus, and the control bus as part one larger bus.
The size of the bus is the number of wires in the bus. We can
refer to individual wires or a group of adjacent wires with
subscripts. For example, a bus could have wires
B31-0 to indicate there are 32 wires. We
can then refer to say, B10-0 or B15-9
to refer to some subset of the wires.
A bus can be drawn as a line with a dash across it to indicate
there's more than one wire.
Pros and Cons
Here are the pros and cons of using a bus.
- A bus allows any number of devices (in principle) to hook up to the
bus. (Pro)
- Devices must share the bus, i.e., only one device can write to it
at a time. (Con).
One alternative to using a bus is to connect each pair of devices
directly. Unfortunately, for N devices, this requires about N2
connections, which may be too many. Most devices have a fixed number
of connections which doesn't permit dedicated connections to other
devices. A bus doesn't have this problem.
Data, Address, and Control Busses
Mostly, we'll consider the bus that connects the CPU to memory.
There are usually 3 kinds of busses. There's a 32-bit data bus, which is
used to write or read 32 bits of data to or from memory. There's
a 32-bit address bus for the CPU to specify which address to read
or write from or to memory. Finally, there's a control bus to allow
the CPU and memory to communicate (for example, to indicate when and
whether a read or write is to be performed).
To support two 32-bit busses, both the CPU and memory require
64 pins (or connections). In the old days, this was a lot of pins
to have. Old CPUs may have had as little as 48 pins. One solution
was to use the same bus as both address and data bus.
In such a solution, the CPU would send an address to memory.
Memory would require the equivalent of a register to store the
address. Then, the CPU would use the same bus to send the data.
Memory could then be read from or written to.
With separate busses, you can do this in one step instead of
two steps.
Other Busses
There are other kinds of busses that are used primarily for I/O
devices. You have USB, FireWire, etc. These are mostly high-speed
busses for external devices.
Bus Speed
One attribute of busses is its speed. The speed of the bus refers
to how fast you can change the data on the bus, and still have devices
be able to read the values correctly. The speed can be measured
in say, MHz, that is up to 106 changes per second.
Bus speed can limit how fast a CPU can communicate with memory.
The size of a bus can also limit the speed too.
Summary
At its simplest, a bus is a set of wires. Each wire can transmit
a single bit. At most, only one device can write to a bus, and
many devices can read from it.
Web Accessibility