Understanding the ALU: Uncovering CPU Functionality

In summary: 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.
  • #1
JonMaS
2
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
  • #2
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.
 
  • #3
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?
 
  • #4
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.
 
  • #6
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.
 

1. What is the ALU?

The ALU, or Arithmetic Logic Unit, is a key component of a CPU (Central Processing Unit). It is responsible for performing arithmetic and logical operations, such as addition, subtraction, and comparison, on data stored in the computer's memory.

2. How does the ALU work?

The ALU works by receiving instructions from the control unit of the CPU and then manipulating the data according to those instructions. It has multiple inputs and outputs, allowing it to perform complex calculations and comparisons.

3. What is the role of the ALU in a CPU?

The ALU plays a crucial role in the CPU by performing all the necessary mathematical and logical operations on data. It is also responsible for determining the outcome of conditional statements and facilitating the transfer of data between different parts of the CPU.

4. How does the ALU differ from other components of a CPU?

The ALU is unique from other components of a CPU in that it is specifically designed to perform arithmetic and logical operations. Other components, such as the control unit and registers, have different functions, such as controlling the overall operation of the CPU and storing data temporarily.

5. Why is understanding the ALU important?

Understanding the ALU is crucial for anyone studying computer science or computer engineering. It provides a deeper understanding of how a CPU functions and how data is processed. This knowledge is essential for developing efficient algorithms and programming languages.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
3K
  • Programming and Computer Science
Replies
22
Views
907
  • Programming and Computer Science
Replies
3
Views
1K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Programming and Computer Science
Replies
29
Views
3K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
10
Views
3K
Back
Top