How does an electrical signal physically flow in a processor

In summary: The first thing you need to understand is binary. Binary is just a numbering system that uses 0s and 1s. A digital signal is made up of tiny bits, or 'binary digits'. Each binary digit is made up of two components: a 0 and a 1. The 0 and 1 are represented by small electric currents going up and down on wires called 'bits'. The number of bits in a digital signal is always the same size, no matter how big the signal. The bits in a
  • #1
DIVERGENCEMASTER47
3
1
I am a high school student interested in electronics. I have been able to understand almost everything about electricity and digital computers mosfets, logic gates,memory,cpu, fetching ,decoding, executing ,clock cycles, etc. except there is one thing that I can't seem to grasp my head around, how do binary instructions 0s and 1s get read by the processor in what physical form ? is it a bit stream like a square wave that goes up and down signifying a 0 and a 1 like an AC signal, or are certain wires powered and certain wires powered off and connected together like a bus so that if 4 wires were on and 4 were off then at the end of the bus there would be 11110000 and the processor would understand it ? Could someone please elaborate on the physical elctrical nature of how binary data is transmitted through the billions of transistors inside a processor? and how the processor would know where the signal was ? thank you.
 
Engineering news on Phys.org
  • #2
I do not get into the inner workings of processors but I would assume there is a combination of serial and parallel 'wiring'. Do you know what a register is? Or a shift register? The experience I have is with Microchip PIC processors programmed in C. This is quite a step up from actually writing the machine code as one does not worry about what specific address in memory things are stored in and things of this nature. The programmer still has to have an understanding of how the device works but much of the headaches are lessened. This can be at a cost however, critical timing for instance is best handled when writing in machine code.
 
  • Like
Likes DIVERGENCEMASTER47
  • #3
DIVERGENCEMASTER47 said:
I am a high school student interested in electronics. I have been able to understand almost everything about electricity and digital computers mosfets, logic gates,memory,cpu, fetching ,decoding, executing ,clock cycles, etc. except there is one thing that I can't seem to grasp my head around, how do binary instructions 0s and 1s get read by the processor in what physical form ? is it a bit stream like a square wave that goes up and down signifying a 0 and a 1 like an AC signal, or are certain wires powered and certain wires powered off and connected together like a bus so that if 4 wires were on and 4 were off then at the end of the bus there would be 11110000 and the processor would understand it ? Could someone please elaborate on the physical elctrical nature of how binary data is transmitted through the billions of transistors inside a processor? and how the processor would know where the signal was ? thank you.

Good for you for thinking about such things in high school. The answer is, " all of the above". In different circumstances, they use every imaginable method.

But you would not have 8 wires to one transistor. You would have 8 transistors, each handling one bit.

Try this article to get you started.
https://upload.wikimedia.org/wikipedia/commons/5/56/74LS192_Symbol.png

Then
https://en.m.wikipedia.org/wiki/CMOS

Edit: whoops, the first link is wrong. I meant https://en.m.wikipedia.org/wiki/Logic_gate
 
  • Like
Likes DIVERGENCEMASTER47 and Averagesupernova
  • #4
I also want to commend the OP for already having a level of understanding that I am sure is above average.
-
This may help a bit: https://en.wikipedia.org/wiki/Shift_register
-
Having a good grasp on what a register is really helped me understand processors a lot. It seems trivial but I never thought I had a decent education when it comes to microprocessor and digital systems. I didn't feel I had a really good grasp until I struggled through it on my own.
 
  • Like
Likes DIVERGENCEMASTER47
  • #5
Might be worth to OP looking up some 7400 series integrated circuits.
In my day minicomputers were built from them and a CPU occupied maybe three 15 inch square circuit boards, and other boards of same size would hold perhaps 8K each of magnetic core memory. A 16 bit computer with 32K of memory was be the size of a small refrigerator and weighed maybe ninety pounds. Of course now it's smaller than a postage stamp...

We troubleshot them gate by gate with a 'scope .
https://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits
http://www.ti.com/lit/ds/symlink/sn7494.pdf

It was painful, but one sure got to know his computer wire by wire.
One should learn some assembly language to get a feel for hardware.

old jim
 
Last edited by a moderator:
  • Like
Likes DIVERGENCEMASTER47
  • #6
I do like to point out a concept I REALLY did not get taught in college is the idea of abstraction. Basically the circuits are constructed in a way to do a job, in this case to pass along information, how they do it does not really need to be understood in the broader sense - but an understanding of the foundation is valuable. (Love this lecture) .

So much like reading these words, the way the letters are shaped have nothing to do with the information they contain, the exact circuits used really have nothing to do with the "numbers" they contain. If we construct a system to communicate Morse code - the circuits are simpler, the System is less efficient - today digital circuits have evolved over time to become more efficient ( both in time and energy!) ...

I guess my point is try not to bite off (figure out) everything at once - looking back at it now I wounder how I survived Engineering because I frequently get hung up in the same mindset that I need to understand all of it before I can understand anything... and none of us really think that way! (IMO Many Engineering schools have a very outmoded mindset on education - here is the book learn, but not how do you learn or think and here is how the theory applies - etc.)

So in this case - electrical signals (in my view) do not flow from one end to another in a processor. The inputs, affect switches(gates), affect more switches... many times, we do get an electrical signals out yes...but each step is more of a logic puzzle; learn how to make ONE logic gate. Then how you can make any logic gate with ether of two specific gates(it's a quiz) By the time you are looking at 4 or 5 gates, you pretty much give up on thinking about the electrical signals themselves..
 
  • Like
Likes DIVERGENCEMASTER47
  • #7
Thank you everyone for your replies, however you guys are still not jabbing at what I am looking for, but good tries.
Let me make it a bit more simple and straight forward for everyone.
So for example we know that a processor has an arithmetic logic unit in it right. The arithmetic logic unit has a bunch of mosfet circuits in it that perform operations. Let's pick a simple one in the ALU for example a full adder that can add two 32 bit numbers together. So the processor first of all needs the instruction to do this(add the two numbers) which is basically binary numbers that have been converted from assembly language that are stored in the RAM . So the command written in the memory would be like R1--> R2 ADD R3. and would essentially have the representation for example after converted by the assembler to 11100111001 ok.I know that there will be a decoder somewhere in the alu that will take some bits from the operation binary numbers and take the opcode and hence turn on the adder circuit somehow. Also the numbers that we are trying to add are located in the memory as well written in binary at their respective addresses.Then the instruction would have to be uploaded to the registers in the processor and the numbers as well whilst following the clock cycles pattern to do that. But here's my question how in the hell does the physical process of fetching the data from the memory and putting it in the processors registers and then adding the numbers together and storing them back in the memory work . I understand it from an assembly language level, but what is actually going on in the circuitry that connects the processor and the memory together or any device for that matter, its easy to understand from a machine language perspective but how the hell is the electricity representing all these numbers and magically understanding what electric signal is what?what is on and what is off? and how does the processor read off the data bus ?
 
Last edited:
  • #8
Do you understand latches and flip-flops? That a shift register is a series of them connected together? You mention an adder in your previous post. Do you understand how to build one out of gates? Do you know what a data bus is and how it interconnects everything? I think this is what you need to work on. I can see where you are coming from because when I was introduced to microprocessors and digital systems it seemed like we jumped from gates and latches right into programming in assembly language. There was very little connect between the very most basic components and how things actually got moved around in a full blown microprocessor system. It seemed like magic at the time that somehow this could all happen but the reality was that I was probably over complicating things. I really really really hope you get a grasp on this as I struggled with it for a long time. Hope I can be of help.
-
Have you seen this?
https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder
-
If you have any more questions don't hesitate to ask. We just ask that you consider the material as it is presented to you here. There really is no skipping ahead when it comes to these things.
 
  • Like
Likes DIVERGENCEMASTER47
  • #9
  • Like
Likes DIVERGENCEMASTER47
  • #10
DIVERGENCEMASTER47 said:
But here's my question how in the hell does the physical process of fetching the data from the memory and putting it in the processors registers and then

I takes a lot of registers, and buses, and parallel/serial/parallel conversions using shift registers like @Averagesupernova said. If you want to know every small step, it is quite involved.

Consider the once famous 6502 computer chip. The pinout is shown below. From that, you can see that there are 16 address bits in parallel, but only 8 data bits. To read or write memory, external circuits have to take the address data to the memory system and make the memory chips read or write 8 bits of data.
post-7456-0-52371000-1334371541.gif

Then here is the pinout for one of the 4116 dynamic RAM memory chips.
TMS4416-pinout.jpg


I think this article might help you The Apple ][ Circuit Description, pages 41-56 describe the memory system that make the 6502 and multiple 4116s work together.

But modern computers have hundreds of millions of components. You'll get weary trying to study them one at a time. So first study ancient computers with fewer components. Below is part of the circuitry for a 1970s PDP-11 computer. If you know how to make an AND or OR gate, and how to make a register and a shift register, you should be on the road to being able to understand it. Each small step is simple.
11_20_dp.gif


Good luck. It seems like you have lots of smart people on this thread trying to help you. If you are serious about your studies, you could build a fruitful and interesting career from your curiosity.
 

Attachments

  • post-7456-0-52371000-1334371541.gif
    post-7456-0-52371000-1334371541.gif
    6 KB · Views: 632
  • TMS4416-pinout.jpg
    TMS4416-pinout.jpg
    6.6 KB · Views: 614
Last edited by a moderator:
  • Like
Likes DIVERGENCEMASTER47 and Averagesupernova
  • #11
I think it's true to say that, since the 'Eighties', no one person has been capable of holding all the knowledge about the structure and operation of a single computer. They are far too complex. (There is also the small matter of the Operating System to consider.) So don't feel too bad about finding it all blindingly complicated - you are in good company.
 
  • Like
Likes DIVERGENCEMASTER47
  • #12
DIVERGENCEMASTER47 said:
how the hell is the electricity representing all these numbers and magically understanding what electric signal is what?what is on and what is off? and how does the processor read off the data bus ?

wow - great questions. I remember being there.

It is nothing but an electric contraption that mimics a mechanical contraption, its parts move from one arrangement to another step by step.
Numbers exist only in the mind of the observer. But we build our contraption so as to mimic the behavior of a number system usually binary...

Let me describe an experiment we did in high school electronics class.

We boys each built a two transistor "T" flip-flop circuit like this one from http://www.electronics-tutorials.ws/waveforms/bistable.html
TFlipflop.jpg

A negative pulse at Trigger makes it change state, so if you feed it a pulse train you get out a square wave with half that frequency.

If you connect a second one at output of first one it'll divide frequency by two again.
A once per second pulse at Trigger input of first one will cause it to produce a 1/2 hz square wave. Second one will produce a 1/4 hz square wave, and you can cascade as many as you want. We cascaded twelve of them and drove the first with 1 hz from a function generator.So that we could see something move, we connected a Simpson 260 analog voltmeter to each flip-flop's output. Each meter was placed adjacent its flip-flop.
TFlipflop2.jpg

set to 10 volt scale of course...We arranged them left to right on a long workbench. So as they toggled you could see the needles move as first one changed state every second, next one every other second, third one every fourth second and so on. It was quite an animation.

That's all it was, an electric contraption. But if you wanted to you could say that it was counting the input pulses in binary, lsb on left and msb on right.
And that's what we did. We carefully zeroed each flip-flop by shorting its D1 , then started the function generator.
Sure enough first needle swung up, then when it swung back down back down second needle swung up, and as we waited the needles swung up and down in binary counter fashion. After about a bit more than an hour we'd accumulated our 4095 counts and all the needles were up, next pulse drove them all down and we cheered "The Grand Slam". It was great fun.

So... the electricity is not representing numbers, it's the observer who ascribes numbers to the state of the electrical contraption. Eletricity just pushes the contraption from one state to the next.
The observer has to decide which voltage state, high or low voltage, represents a "1" bit and a "0: bit. And how he will count, is MSB first or last in his string. Then he builds a machine to do what he wants using transistors . (I helped a friend work on a computer made of 12AU7 tubes. it was National Airlines' reservation system in late 1960's).
You'll find a lot of LOW TRUE logic where zero volts is a 1 and 5 volts(or 3.3) is a zero. It has to be defined someplace which is which, sometimes just in the drawings by a line above the signal name.

I am not being dismissive here, my point is that your questions are of a profoundly fundamental nature . Those are the hardest ones to answer. We old timers forget that fifty years ago we too were learning about the elements of logic, AND OR INVERT TIME-DELAY and MEMORY, from which all computers are built.

If you're a student ask your advisor about a course in logic symbology and boolean algebra.
Hobby projects are a great way to learn too, try searching on sparkfun...

We high school boys learned that day in 1964 that you can build an electronic contraption that mimics the behavior of the binary number system, and watch it at work. I think it affected us all. And we learned to choose between high-true and low-true, and which end of our string is MSB. And how to steer pulses with a diode ... that's how you start.

i hope this was readable.

If you want a mind blower look up "ternary computing" .

And "Babbages' Folly" for early mechanical computing contraptions.

old jim
 
  • Like
Likes DIVERGENCEMASTER47, Tom.G and Averagesupernova
  • #13
DIVERGENCEMASTER47 said:
how does the processor read off the data bus ?
That's just one of your many questions and it can only be answered satisfactorily after you have understood how the more basic circuits operate. You will need to immerse yourself in all this for some while before it starts to gel in your mind. You need to be familiar with the more basic logic elements before things at the higher level of a processor can be related to the low level circuits. Alternatively, you can just go along with the following hand waving description and wait until the details come to you later.
You can think of a data 'bus' as a set of wires (assume it's a parallel bus, with each wire carrying the value of just one bit) Associated with a bus is a bus control circuit that makes sure that a binary value on one particular device output is applied to each wire on the bus and that the value is 'read' by the input of another device at the appropriate time. Each device that's hooked onto the bus has a tri-state output: one, zero or 'disconnected'. All but one of the input devices are 'disconnected' at anyone time. A Clock signal is used to ensure that all the connected input devices change state at the same regular interval and that all output devices 'read' the values on the bus at the appropriate times. The idea of a bus is very sophisticated because it means that only one set of 8,16,32,64 wires needs to be laid down for many different devices to communicate with each other. The value on the bus is read and then stored in a holding circuit (a 'latch' or flip flop circuit) which can be passed on to another device whilst the bus is being used to transfer a different signal between two other devices.
Processors may have a number of buses, one for data, one for instructions, which set up switches to control the logic circuitry functions (temporarily building different logic circuits) which operate on the data (adding, comparing etc). Other buses can carry more 'supervisory' information to the sub systems in the processor.
A very important part of computer design.
 
  • Like
Likes jim hardy and DIVERGENCEMASTER47
  • #14
Thank you everyone for your replies, I think I might have just figured it out. Amazing Stuff guys seriously I think I now have enough knowledge to become an electrical & computer engineer. God Bless you all.
 
  • Like
Likes jim hardy
  • #15
Sophiecentaur gave a nice introductory description there.

Here's a datasheet for a real part that does what he described.
http://www.ti.com/lit/ds/sccs075/sccs075.pdfi hope you become interested in circuitry. The best programmer i ever knew came up through the hardware ranks.
 

FAQ: How does an electrical signal physically flow in a processor

1. What is an electrical signal and how does it flow?

An electrical signal is a flow of electrons through a conductor, such as a wire. In a processor, the signal is created by the movement of electrons through tiny pathways called circuits.

2. How is an electrical signal transmitted in a processor?

In a processor, electrical signals are transmitted through a series of interconnected components, such as transistors and wires. The signal is controlled by the switching on and off of these components, allowing the flow of electrons to be directed and manipulated.

3. What is the role of transistors in the flow of electrical signals in a processor?

Transistors act as switches in a processor, controlling the flow of electrons and amplifying the signal. They are arranged in complex patterns on a processor chip and work together to carry out calculations and processes.

4. How fast do electrical signals flow in a processor?

The speed at which electrical signals flow in a processor is determined by the materials used and the design of the processor. In modern processors, signals can travel at speeds of up to 5 GHz (5 billion cycles per second).

5. Can the flow of electrical signals be affected by external factors?

Yes, the flow of electrical signals in a processor can be affected by external factors such as temperature, interference, and damage to the circuitry. This is why processors are designed with protective measures, such as heat sinks, and undergo rigorous testing before being used in electronic devices.

Back
Top