Chapter 3 Flashcards
CPU (Central Processing Unit)
What is a CPU?
The CPU or Central Processing Unit could be known as the brain of the CPU, but in reality its a fast computer.
What is the Man in the box?
The man in the box is an analogy we can use to describe the function of a CPU. The man in the box can do addition, subtraction. multiplication, but he is stuck in a box. For us to be able to talk to it we need an external data bus. imagine 8 light bulbs on the inside and 8 light bulbs on the outside. We use binary to represent on and off. 1 is on and 0 is off. 8 bits = 1 byte. We created a codebook due to all of the possible patterns and every CPU has a built in code book known as machine learning. We hand the man in the box a codebook and before we close the man the box we install four 16 light bulbs that the man is gonna use as a storage area for our guy to do all his calculations. the 4 sets of 16 light bulbs are called registers.
What are general-purpose registers?
General purpose registers are extra registers that are present in the CPU and are utilized anytime data or a memory location is required.
Does every CPU have labeled registers?
Yes, all CPU’ have labeled registers.
Examples AX Register, BX Register, CX Registers, DX Registers.
How many registers can a modern CPU have?
Modern CPU’s can have 100 different registers and as many as 128 bits across.
What is a clock?
The clocks job is to tell the CPU to do something.
What is the clock in our man in the box analogy?
The clock or the doorbell on the outside of the box tells the man to do something. If we wanted to add two numbers we would type in the number 2 in binary and hit the doorbell which then moves the number 2 to the AX register (takes a bit to zero out) we then add a 3 in binary and it stores it into the BX register again we wait for it to zero after hitting our bell. Our codebook tells us we need to add our two numbers by adding the two numbers in our registers together. Instead of it zeroing out we actually see the external bus showing the binary output of 5.
What is a programmer?
A person who can use machine learning to talk to the CPU to get tasks done.
What is a pipeline?
Something that is running simultaneously. Where we are sending the task to. Think about doing laundry we don’t do just one load then dry it and fold it instead we do another load while we have the first load drying.
What is a prefetch?
Someone who determines where to send the command for the task. It could be the person who is good at math (integer math), someone good with lengthy numbers (long numbers) or give it to someone who is good at holding or sending information to a destination like RAM or a register (cache)
How does the prefetch work?
Prefetch looks at the command and decides who to send it to. When we hit the clock again he will send the task to one of the guys and be given another command in the queue. Once that guy is down with the task he sends it to the cache guy. These commands are moving down in a pipeline also known as a core.
How can you tell which CPU to go for?
Modern CPUs are loaded with tons of features and looking at the features will help you decide.
What two distinct features is Modern CPU measured by
Clock speed and Cores
What is a hertz (Hz)
We measure how many tasks per second to figure out what a cpu can actually do. We call that one second per task a hertz or Hz. 1 megahertz (1 MHz) = 1 million per second tasks.
What clock speed are modern Cpu’s measured by?
Gigahertz
What is a single-core CPU?
Most CPU’s are single-core meaning it only has one CPU on that system chip and only one lane where information can travel back and forth from.
How did we fix the issue of having only one lane for information to travel back and forth?
We enabled multi-core on a CPU to help provide an alternative lane for information to go back and forth on.
What is a dual core?
When we go from a single core and add one more core and now our traffic of data has two ways of going.
What is it called when we add 2 lanes of information when we already have two lanes?
A quad-core.
What is a CPU called when it has 3,060 cores?
Threadrippers
What CPU is found in IoT devices? (arduino, raspberri pi)
Advanced Risk Machine (ARM) chip.