How some bits are turned on while others remain off

computer-architecturehardware

How does the computer turns physically different bits on and off?
I mean that the electricity flows to the transistors in order to turn them on or off but there are many transistors so what part in the hardware makes some of them on while the others off. There are no different wire for each transistor so what is it exactly?

Best Answer

In a computer, "bits" as you say generally move through the computer in parallel busses corresponding to the word length of the computer, which might be 8, 16, 24 or 32 bits (earlier computers also used other values like 12, 18 and 36).

At various points in the computer, these signals are get stored in registers, which are typically made up of flip-flops. Here is a simple set-reset (SR) flip-flop made up of two NAND gates (NAND stands for NOT AND). For a register containing 8 bites (one byte), there would be 8 of these flip-flops. (In reality, the flip-flops used would typically be made up of a more complex circuit, but the concept is the same.) So each bit of the register is kept separate (the Q leads are the positive outputs).

enter image description here

Each of these NAND gates is made up of transistors. Here is a simplified circuit for one NAND gate using MOSFET transistors:

enter image description here

The two inputs A and B correspond to the two inputs going into the symbolic NAND gate as shown in the first drawing above. The Y lead corresponds to the Q lead of the first drawing.

There are four transistors. True, each input A and B is connected to the gates of two transistors. That is done to facilitate the operation of the gate, as I have described in another answer here. It doesn't mean the bits are connected together -- I'm not sure where you got that idea. Remember, one bit is represented by the entire flip-flop, made up of two of these NAND gates, or eight transistors total.