Architecture of the central processing unit (CPU): Difference between revisions

From Computer Science Wiki
(Created page with "<center> <blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;"> File:Exclamation.png This is an '''important concept'''. You should ful...")
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
<center>
<blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;">
  [[File:Exclamation.png]] This is an '''important concept'''.  You should fully understand this.
</blockquote>
</center>
[[File:binary.png|frame|right|This is a basic concept in computer science]]
[[File:binary.png|frame|right|This is a basic concept in computer science]]


ASCII  abbreviated from American Standard Code for Information Interchange is a character-encoding scheme. ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many additional characters. ASCII was the most common character encoding on the World Wide Web until December 2007, when it was surpassed by UTF-8, which is fully backward compatible to ASCII.<ref>https://en.wikipedia.org/wiki/ASCII</ref>
A central processing unit (CPU) is the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions. <ref>https://en.wikipedia.org/wiki/Central_processing_unit#Operation</ref>




== Major parts of a CPU ==  
== Major parts of a CPU ==  
This is one of the better videos I've seen.
 
Below we see a '''simplified''' diagram describing the overall architecture of a CPU.  You must be able to outline the architecture of the central processing unit (CPU) and the functions of the arithmetic logic unit (ALU) and the control unit (CU) and the registers within the CPU.
 
[[File:Cpu diagram.png]]<ref>https://en.wikibooks.org/wiki/IB/Group_4/Computer_Science/Computer_Organisation#von_Neumann_Architecture</ref>
 
 
Please know and understand:
 
* Memory holds both data and instructions
* The arithmetic/logic gate unit is capable of performing arithmetic and logic operations on data
* A processor register is a quickly accessible location available to a digital processor's central processing unit (CPU). Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only<ref>https://en.wikipedia.org/wiki/Processor_register</ref>
* The control unit controls the flow of data within the CPU - (which is the Fetch-Execute cycle)
* Input arrives into a CPU via a bus
* Output exits the CPU via a bus
 
== Comparing CPU's ==
When we compare CPU's, we weigh a number of important factors, such as clock speed, number of cores, [https://en.wikipedia.org/wiki/Thermal_design_power tdp], socket type and class (desktop, laptop, mobile device).
 
But really, in a nutshell, it comes down to how much computing can be done when all parts of a CPU come together in a single clock cycle. If performing Task X takes two clock cycles on CPU A and one clock cycle on CPU B, then CPU B might be the better processor even if CPU A has a higher clock speed.<ref>https://www.makeuseof.com/tag/compare-different-cpus-right-way/</ref>
 
== A more advanced discussion of a CPU ==
This is an excellent video discussing how a CPU actually works.
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/FZGugFqdr60?list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo" frameborder="0" allowfullscreen></iframe>
</html>
 
These videos are truly superb to help you understand parts of a CPU, and how they work.




<html>
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/V04dtxEUjsI" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/cNN_tTXABUA" frameborder="0" allowfullscreen></iframe>
</html>
</html>


== Do you understand this topic? ==  
== Do you understand this topic? ==  


* What is ascii?
Outline the architecture of the central processing unit (CPU) and the functions of the arithmetic logic unit (ALU) and the control unit (CU) and the registers within the CPU.
 
'''Parts of a CPU:'''
 
# ALU - The arithmetic logic unit executes all calculations within the CPU
# CU - control unit, coordinates how data moves around
 
'''Registers''',  a memory location within the actual processor that work at very fast speeds. It stores instructions which await to be decoded or executed.
 
# PC - program counter - stores address of the -> next <- instruction in RAM
# MAR - memory address register - stores the address of the current instruction being executed
# MDR - memory data register - stores the data that is to be sent to or fetched from memory
# CIR - current instruction register - stores actual instruction that is being decoded and executed
# ACC - accumulator - stores result of calculations 
 
'''Buses'''


== Do you have an advanced understanding about this topic? ==
# address bus - carries the ADDRESS of the instruction or data
# data bus - carries data between processor and the memory
# control bus - sends control signals such as: memory read, memory write


* convert number to ASCII and vice-versa
Together, these buses may be referred to as the “system bus” or the “front-side bus”




[[File:Blank CPU diagram.png|caption|Can you fill this in?|225px ]]


== See Also ==
== See Also ==
Line 38: Line 77:


[[Category:computer organization]]
[[Category:computer organization]]
[[Category:Very important ideas in computer science]]

Revision as of 09:58, 6 March 2020

This is a basic concept in computer science

A central processing unit (CPU) is the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions. [1]


Major parts of a CPU[edit]

Below we see a simplified diagram describing the overall architecture of a CPU. You must be able to outline the architecture of the central processing unit (CPU) and the functions of the arithmetic logic unit (ALU) and the control unit (CU) and the registers within the CPU.

Cpu diagram.png[2]


Please know and understand:

  • Memory holds both data and instructions
  • The arithmetic/logic gate unit is capable of performing arithmetic and logic operations on data
  • A processor register is a quickly accessible location available to a digital processor's central processing unit (CPU). Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only[3]
  • The control unit controls the flow of data within the CPU - (which is the Fetch-Execute cycle)
  • Input arrives into a CPU via a bus
  • Output exits the CPU via a bus

Comparing CPU's[edit]

When we compare CPU's, we weigh a number of important factors, such as clock speed, number of cores, tdp, socket type and class (desktop, laptop, mobile device).

But really, in a nutshell, it comes down to how much computing can be done when all parts of a CPU come together in a single clock cycle. If performing Task X takes two clock cycles on CPU A and one clock cycle on CPU B, then CPU B might be the better processor even if CPU A has a higher clock speed.[4]

A more advanced discussion of a CPU[edit]

This is an excellent video discussing how a CPU actually works.

These videos are truly superb to help you understand parts of a CPU, and how they work.


Do you understand this topic?[edit]

Outline the architecture of the central processing unit (CPU) and the functions of the arithmetic logic unit (ALU) and the control unit (CU) and the registers within the CPU.

Parts of a CPU:

  1. ALU - The arithmetic logic unit executes all calculations within the CPU
  2. CU - control unit, coordinates how data moves around

Registers, a memory location within the actual processor that work at very fast speeds. It stores instructions which await to be decoded or executed.

  1. PC - program counter - stores address of the -> next <- instruction in RAM
  2. MAR - memory address register - stores the address of the current instruction being executed
  3. MDR - memory data register - stores the data that is to be sent to or fetched from memory
  4. CIR - current instruction register - stores actual instruction that is being decoded and executed
  5. ACC - accumulator - stores result of calculations

Buses

  1. address bus - carries the ADDRESS of the instruction or data
  2. data bus - carries data between processor and the memory
  3. control bus - sends control signals such as: memory read, memory write

Together, these buses may be referred to as the “system bus” or the “front-side bus”


Can you fill this in?

See Also[edit]

References[edit]