Most modern computers are based on the Von Neumann architecture first developed by John von Neumann in 1945. The architecture consists of:
A diagram of the how the components of the Von Neumann Architecture interact with one another follows:
This diagram illustrates the Von Neumann Architecture and the interaction between its core components. Input devices and main memory transmit data and instructions to the CPU, which processes the information and sends the results to output devices. The CPU maintains a direct connection with main memory, allowing for efficient data retrieval and execution of instructions. Main memory serves as an intermediary, directly interfacing with both the CPU and secondary memory, facilitating the transfer of data between volatile and non-volatile storage. Additionally, secondary memory communicates directly with main memory, enabling long-term data storage and retrieval as needed.
The Central Processing Unit (CPU) is where all instructions are executed. Some examples of the instructions executed in the CPU are arithmetic, logic, and input/output operations. The CPU has a 3 principle components:
The arithmetic logic unit (ALU) which performs arithmetic and logic.
Registers which supply operands (data) to the ALU and store the results of computations from the ALU.
A control unit which controls getting instructions/data from memory, decodes instructions and instructs the ALU on which operations/registers/components to use.
Most modern CPUs come integrated with multiple CPUs on a single chip (each CPU being called a physical core), this is called a multi-core processor. These cores can also be virtually split using software to create multiple virtual cores out of a single physical core, this is called multithreading. Multithreading is mostly common in higher end CPUs, but some lower end CPUs also have multithreading. The two most common brands of CPUs, Intel and AMD, have their own versions of multithreading. Intel has a proprietary version is called hyper-threading. and AMD uses a version called simultaneous multithreading. Lastly, CPUs also have a small memory called cache which can be thought of as intermediate memory between RAM and the CPU for now. A diagram of a single physical core of a CPU follows:
This diagram illustrates the internal communication within a CPU, highlighting the interactions between its key components. Each physical core contains a Control Unit, which orchestrates the execution of instructions by directing data flow between the Registers and Arithmetic Logic Unit (ALU) (indicated by the red arrows).
The ALU retrieves instructions and data while also transferring computed results into Registers for temporary storage and further processing (denoted by the black arrows). This structured interaction ensures efficient instruction execution and data handling within the processor.
Main memory directly holds the instructions and data that programs to be run are comprised of. Main memory is volatile memory that is lost when the computer is shut off. Examples of the types of instructions that are held in main memory are (but not limited to):
Input/output
Arithmetic
Logic
Controlling
These instructions allow programmers to take input in from users, write output to users/for storage/etc., perform arithmetic using data, perform logic using data, and controlling hardware/software. The other thing stored in memory is data. Some examples of data are (but not limited to):
Integers: Whole numbers
Floating-point numbers: Continuous numbers (numbers with a decimal place)
Characters: The values on the keyboard
Strings: 0 or more characters
Modern computers commonly have 2GB, 4GB, 8GB, 16GB, or 32GB of RAM but there are systems that have much much more RAM. Theoretically there is no limit to the amount of RAM a computer can have. To store values RAM stores instructions in bits. Bits are the smallest unit of measurement used to represent computer data and can be the value 0 or 1. In hardware bits are made up of generally 6 transistors which is silicone that can hold either a positive or negative charge. These groupings of transistors will uniformly hold either a negative charge representing a 0 bit or a positive charge representing a 1 bit. More commonly these groupings of transistors/bits will be referred to as memory cells. Memory cells are single electronic circuits that hold one bit of information. Each memory cell has an address to allow it to be called by a program. A memory address is the specific location of a single memory cell. Just like a house has an address that mail can be sent to or can be visited to be checked up on, each memory cell has an address that can be told to turn on or off (written to) or be checked to see if it on or off (read from).
Single cells of memory are sometimes used such as in the case of boolean data, but more commonly cells are grouped together in groups of size = 2^n, n > 2 (i.e. 8, 16, 32, 64, 128). When this is done the address of the first cell in the group of cells is used as the address for the group. These groups of cells can then be used to store the instructions and data the programs are comprised of. A diagram of memory cells and addresses follows:
When the cells are grouped together in this example there are 2 pieces of data that are stored. Memory cell 0x00001 contains the piece of data 10110110 and memory cell 0x0001A contains the piece of data 01101101. If these were say whole numbers that were stored by a program they would translate to memory cell 0x00001 having the number 182 in its cells and memory cell 0x0001A have the number 109 in its cells.
Secondary memory holds the instructions and data that needs to be retained regardless of power state. Secondary memory is non-volatile memory which is retained when the computer is shut off. When running programs the problem with secondary memory is that it is slow to lookup data compared to main memory. When a program is being run and something is needed from secondary memory it is pulled from secondary memory and stored in main memory so that the CPU can access it much quicker.
Much like main memory secondary holds its data in memory cells called by addresses which can be grouped together to store different sized pieces of data and instructions. Secondary memory comes in many forms. Some examples of secondary memory are hard disk drives (HDD), solid state drives (SSD), compact discs (CD), floppy disks, flash drives, etc.
To receive input the CPU relies on input devices. There are many types of input devices. The first two input devices that will probably come to mind are the keyboard and mouse. The keyboard allows for characters to be entered into the computer, and the mouse allows for point-and-click input. A lesser thought of input devices is memory. Memory is considered an input device because memory inputs data and instructions into the CPU.
To show that the CPU is actually doing anything it needs to be able to write output to output devices. The most common output device is the display or monitor of a computer. Other common output devices include the speakers, printers, and even memory. Memory can also be thought of as an output device because the CPU is able to run instructions that outputs instructions and data to memory.
For all of these systems to communicate there has to be something to connect them together, this is what the System BUS is for. The system BUS connects the major components of a computer system. In the Von Neumann Architecture there is a single BUS shared between all the components which is a severe bottleneck as only one component may talk to another at a time. This bottleneck is solved in modern computers with different BUS's being used by the different components.
Computers operate in a digital format, meaning that the signals they process are represented as either "on" or "off," which are called bits. At their most fundamental level, bits are the only form of data that a computer can understand and process. Within the Von Neumann architecture, the various components communicate with one another by sending and receiving bits. However, single bits are limited in usefulness, so they are typically grouped together into larger units, with the most common grouping being 8 bits, known as a byte. Some other typical arrangements of bits primarily used in memory are:
Unit | Symbol | Bits/Bytes |
---|---|---|
Byte | B | 8 bits |
Kilobyte | KB | 1024 bytes |
Megabyte | MB | 1,048,576 bytes |
Gigabyte | GB | 1,073,741,824 bytes |
Terabyte | TB | 1,099,511,627,776 bytes |
Petabyte | PB | 1,125,899,906,842,624 bytes |
Exabyte | EB | 1,152,921,504,606,846,976 bytes |
Zettabyte | ZB | 1,180,591,620,717,411,303,424 bytes |
Two commonly used groupings of bits in modern computing are 32-bit instructions and 64-bit instructions, which refer to the length of instructions that a computer can process at one time. Earlier systems typically used 32-bit instructions, but most modern computers now standardize on 64-bit instructions to allow for greater processing power and the ability to address larger amounts of memory. Data, like instructions, is also grouped into specific bit arrangements, which are closely tied to data types. These groupings of bits—whether instructions or data—form the basis of machine language, a computer-readable language composed entirely of 0s and 1s. Programs written in machine language are called machine code -- binary code executed by the CPU.
Although machine language is the fundamental way computers operate, it is highly complex and difficult for humans to understand without specialized knowledge. To make programming more accessible, we use high-level programming languages, which abstract away the intricate details of how the computer handles bits and machine code. These abstractions allow programmers to focus on solving problems and writing logical instructions. Programs written in a high-level language are called source code.
Note: Since there are 2 values for bits, the arrangements of them are typically in powers of 2.
Input Devices - Hardware components that allow users to interact with a computer by providing data or control signals for processing.
Output Devices - Hardware components that receive data from a computer system and translate it into a form understandable to users.
Central Processing Unit (CPU) - - The primary component of a computer that performs most of the processing operations.
Main (Primary) Memory (RAM) - Memory that stores data and instructions that the CPU uses during execution.
Secondary Memory (Storage) - Storage devices that store data and programs permanently.
Volatile – Memory that loses its content when the power is turned off.
Non-Volatile – Memory that retains data without requiring a constant power supply.
System BUS - Connects the major components of a computer system.
Bit - The smallest unit of measurement used to represent computer data and can be the value 0 or 1.
Memory Cell - Single electronic circuits that hold one bit of information.
Memory Address - The specific location of a single memory cell.
Machine Language - A computer-readable language composed entirely of 0s and 1s.
High Level Language - A programming language which abstracts away the intricate details of how the computer handles bits and machine code.
Machine Code - Binary code executed by the CPU.
What is the Von Neumann architecture, and who developed it?
What are the main components of the Von Neumann architecture?
How do input devices interact with the CPU in the Von Neumann architecture?
What role does main memory play in the Von Neumann architecture?
How does secondary memory interface with main memory and the CPU?
What is the major bottleneck in the Von Neumann architecture, and how do modern computers address this issue?
What are input devices, and why are they important in a computer system?
List and describe at least five input devices.
Why is memory considered an input device?
What are output devices, and why are they important in a computer system?
List and describe at least five output devices.
Why is memory considered an output device?
What is the function of the CPU in a computer system?
What are the three main components of the CPU, and what does each do?
What is the Arithmetic Logic Unit (ALU), and what operations does it perform?
How do registers assist in CPU operations?
What is the control unit, and what role does it play in instruction execution?
What is a multi-core processor, and how does it improve performance?
What is the difference between physical cores and virtual cores?
What is hardware multithreading, and how does it benefit processing?
What is the purpose of RAM in a computer system?
Why is RAM considered volatile memory?
What types of data and instructions are stored in RAM?
What are bits, and how are they used in memory storage?
What is a memory cell, and what does it store?
What is a memory address, and how does it function in RAM?
How are multiple memory cells grouped together, and why?
What hardware components make up a bit in memory?
How do transistors store binary values in RAM?
Why are memory addresses important in computer programming?
What is secondary memory, and how does it differ from primary memory?
Why is secondary memory considered non-volatile?
What is the main disadvantage of secondary memory compared to RAM?
How does data move between secondary memory and RAM?
List and describe at least five types of secondary storage devices.
What is the system BUS, and what role does it play in a computer system?
Why is the single system BUS a bottleneck in the Von Neumann architecture?
How do modern computers mitigate the limitations of a shared system BUS?
What is a bit?
What is a byte, and how many bits does it contain?
What are some common groupings of bits in memory, and what are their sizes?
What is the difference between 32-bit and 64-bit instructions?
How do bits and bytes form machine language?
What is machine code, and how does it differ from high-level programming languages?
What are the advantages of high-level programming languages over machine code?
Why do high-level programming languages exist if computers only understand machine code?
What is the role of source code in computer programming?
Why are memory and data arrangements typically in powers of 2?