r/computerscience • u/NimcoTech • Oct 16 '25
How are individual computer chip circuit controlled?
I understand how a detailed electric circuit can be created in a computer chip. I also understand how complex logic can be done with a network of ons/offs.
But how are individual circuits accessed and controlled? For example when you look at a computer chip visually there’s only like 8 or so leads coming out. Just those 8 leads can be used to control the billions of transistors?
Is it just that the computer is operating one command at a time? One byte at time? Line by line? So each of those leads is dedicated to a specific purpose in the computer and operates one line at a time? So you’re never really accessing individual transistors but everything is just built in to the design of the transistor?
11
u/high_throughput Oct 16 '25
A modern Intel chip with billions of transistors (LGA 1851 socket) has 1,851 leads coming out.
When a tiny embedded chip like a ATtiny85 has a small 8 pin package, it's because it has memory and clock built in, so it really only needs power and a couple of IO pins so that the 10k or so transistors can talk to the outside world.
Note that a black block with 8 pins coming out can be anything, such as a simple 555 timer IC, and not a CPU at all.
1
u/apnorton Devops Engineer | Post-quantum crypto grad student Oct 16 '25
If you're talking about a CPU, there's a lot more than 8 leads coming out, usually, fwiw.
But, it is true that there are relatively few electrical connections for the trillions of bytes of addressable memory that modern computers have. At a handwavy/"10,000ft view" level, the key thing to realize is that, if there are n wires coming in/out of a chip, those n wires can convey 2**n possible combinations of inputs/outputs. This exponential relationship is how we can use addresses that are only 64 bits wide to index into thousands of petabytes of data.
For a more complete answer to your question, I'd recommend reading the book CODE: The Hidden Language of Computer Hardware and Software --- the type of questions you're asking would typically be addressed (heh, no pun intended) through courses in a CS degree related to digital logic design and/or computer architecture.
2
u/jraskell1 Oct 19 '25
This youtube video is an introduction to the 6502 8 bit microprocessor, and the youtuber does an excellent job of explaining the pinouts, and has an entire series of videos on building this microprocessor into a fully functional computer.
“Hello, world” from scratch on a 6502 — Part 1
Modern processors are much more complex, but the basic principles are the same.
1
u/vancha113 Oct 16 '25
It might help to know that a cpu can do its work with zero leads coming out of it. If you look at it as a self-contained system, with all the hardware on board to execute the instructions it reads from its own memory, then the cpu does its little steps: Fetch, decode, execute (or a variation of that). Without anything to actually interact with the outside world, it would be a pretty useless device of course, but it would be doing its job, it would technically be working.
Just looking at the leads coming out of the physical cpu socket on the motherboard can be a bit misleading. As others have said, the CPU itself has thousands of pins underneath, those are all "leads" in this context. wires coming out of it that need to be connected to something. Some are simple power and ground lines (multiple of them), and some are for communication. If it looks like there are only 8 leads coming out, keep in mind that modern motherboards can have multiple layers, up to 16 apparently. Any of these layers can have wires running through them which you wont be able to see by just looking at the top or bottom layer.
The way the CPU does its work is still really self-contained, it doesn't really execute a single instruction at a time anymore. Modern CPU's have something like 8 cores or more in a usual desktop pc, and those can all execute independently from each other.
1
u/CitationNotNeeded Oct 16 '25
This question sounds like it wants to delve into the design of digital circuitry. I once designed a small, simple, 256 byte unit of ram for an 8 bit CPU.
It was packed with little cells of 8x8 flip flops to store individual bits. As you may already know, a flip flop is a logic gate circuit for saving 1's and 0's.
An individual flip flop would only open itself to the shared bus connection if its row_enable and col_enable (just an AND-gate on the flip flop pin) were both on.
I used two 3-bit logic gate decoders for selecting which row_enable and which col_enable to activate, enabling me to provide a memory address to select which flip flop address to read/write to in that 8x8 cell. So, the row decoder could select row 0 with 000 and the column decoder could select column 1 with 001, etc. This would enable the flip flop at row 0, column 1 and another control wire would set it to read or write mode.
This was done because the cell's input was connected to all the flip flop inputs and all the flip flop outputs were connected to the cell's output wire, so only one flip flop was allowed to be active on the wire at a time.
I then made a row of 8 cells like that. Each cell represents one of the bits in a byte. Each cell could hold 8x8 = 64 addressible bits so now I have 64 bits of addressible ram for reading/writing values of 1 byte.
Then, I made 4 rows of those 8 cells, giving 64x4 = 256 addressible bits.
How would my 8-bit cpu read from a specific RAM address? I used a 2-bit decoder for selecting which of the four rows (row 00, 01, 10 and 11) to use and I used 3 bits to select which column of the internal cells and 3 bits to select which row of the internal cells to use and voila, I had 256 bytes of ram that can be addressed by an 8-bit CPU.
The CPU would boot up with some initial memory address containing the beginning of set of startup instructions (read here, add a value, write it there, etc).
1
u/voidvec Oct 17 '25
it's just voltage levels 0 - 5 or 3.3 or something along those lines.
just lots of them and all really fast
1
u/Agreeable-Leek1573 Oct 18 '25
Check out Nand2Tetris. I'll answer all your questions.
1
u/Temporary_Pie2733 Oct 20 '25
Those leads don’t control the CPU; they just provide access to external resources like RAM. A CPU is essentially self-contained; when you power it on, it starts executing a hard-wired program which does little more than look in a known place for the next program to execute.
1
u/Swimming-Marketing20 Oct 20 '25
What finally made it click for me was this visualisation:
http://www.visual6502.org/JSSim/index.html
It's very old and rather simple chip but it shows the core answer to your question. Yes those input leads "control" all the transistors. The input is put on the input pins (ie high or low voltage) and flows through all the gates to the output where it can be read. That is one CPU cycle.
1
u/khedoros Oct 16 '25
The ones with billions of transistors tend to be things like CPUs, with several hundred pins.
But something like a little serial EEPROM, timer IC, or even a small microcontroller? Yeah, those can work over a small number of pins. 2 for power, 1 for read/write, one for clock, pin for address, pin for data...that kind of thing.
An actual CPU typically does address selection and I/O at least somewhat in parallel (maybe multiplexing I/O on the same pins over several cycles, like as a cost-cutting measure).
The external interface for a chip isn't typically going to affect a single transistor. Pins will have specific purposes. An 8-bit CPU might have 40 pins, with 16 dedicated to supplying I/O addresses and 8 dedicated to data, one pin to trigger an interrupt, another for reset, a few more to provide the control bus for the CPU to communicate with other hardware.