Understanding the ALU: Uncovering CPU Functionality

  • Thread starter Thread starter JonMaS
  • Start date Start date
  • Tags Tags
    Alu cpu Unit
AI Thread 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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top