Understanding the ALU: Uncovering CPU Functionality

  • Thread starter Thread starter JonMaS
  • Start date Start date
  • Tags Tags
    Alu cpu Unit
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 4K views
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?
 
Physics 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.