Understanding the ALU: Uncovering CPU Functionality

  • Thread starter Thread starter JonMaS
  • Start date Start date
  • Tags Tags
    Alu cpu Unit
Click For Summary
The discussion centers around the function of the Arithmetic Logic Unit (ALU) within the CPU and its interaction with the operating system (OS) and memory. The ALU is responsible for executing arithmetic and logic operations, while the control unit (CU) manages instruction flow. When a computer is powered on, the BIOS reads a specific sector of the hard disk to load the OS into memory. Programs, composed of binary code (1s and 0s), must be loaded into memory before execution. The CPU interprets these binary patterns as instructions, enabling operations like loading data into registers or performing calculations. The OS plays a crucial role in scheduling applications and mapping them to the necessary hardware resources. Understanding the boot process and memory loading clarifies how programs transition from binary code to functional applications.
JonMaS
Messages
2
Reaction score
0
Hi! I am new here and I have come to feed and develop my curiosity in mathematics and sciences. School is not enough I guess...

The ALU is the part of the CPU in which every instruction is executed, right?
But I don't understand, the OS itself is a software in machine language, it is installed on the hard disk and then the CPU "calls" the file that starts everything.
That file is also made of binary numbers, and so each and every file.
Now, the ALU is capable of doing the simple binary operations(addition, subtraction, multiplication and division) and more operations such as addressing, memory operations...

How does the ALU reads the file and breaks the million ones and zeros into simple operations, that would eventually become functional program?
 
Technology news on Phys.org
JonMaS said:
Hi! I am new here and I have come to feed and develop my curiosity in mathematics and sciences. School is not enough I guess...

The ALU is the part of the CPU in which every instruction is executed, right?
No, the arithmetice and logic unit (ALU) takes care of arithmetic operations such as addition and multiplication, and logic operations such as whether a certain condition is true.
JonMaS said:
But I don't understand, the OS itself is a software in machine language, it is installed on the hard disk and then the CPU "calls" the file that starts everything.
When you turn the computer on, there is code in the BIOS that reads a certain sector on the HD. That sector contains code for loading more of the operating system into memory.
JonMaS said:
That file is also made of binary numbers, and so each and every file.
Now, the ALU is capable of doing the simple binary operations(addition, subtraction, multiplication and division) and more operations such as addressing, memory operations...
Another big chunk of the CPU is the control unit (CU). Here's a link to a wiki article on the CPU: http://en.wikipedia.org/wiki/Cpu.
JonMaS said:
How does the ALU reads the file and breaks the million ones and zeros into simple operations, that would eventually become functional program?
It doesn't. Before a program runs it must be loaded into memory. Once loaded into memory, the operating system starts the program. Certain patterns of 1s and 0s cause the CPU to do certain things. People write programs with that in mind.
 
It doesn't. Before a program runs it must be loaded into memory. Once loaded into memory, the operating system starts the program. Certain patterns of 1s and 0s cause the CPU to do certain things. People write programs with that in mind.[/QUOTE]

Are the 1s and 0s loaded into memory?
What are all the certain things?
 
JonMaS said:
Are the 1s and 0s loaded into memory?
What are all the certain things?
The computer operating system loads the program into memory, in bytes, groups of 8 bits.

The CPU interprets specific patterns of bits as instructions to load the contents of memory into a register, transfer the contents of a register to memory, add two registers, and so on.
 
The ALU is hardware in the CPU designed to do arithmetic operations as add, sub, shift etc.
That's it. A part of the instruction word is dedicated to the ALU, there are other units as well.

The OS schedules applications and map them to the hardware the applications needs to do its thing.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
29
Views
5K
  • · Replies 10 ·
Replies
10
Views
3K