Skip to content

Commit

Permalink
removed redundant data and made alu.md prettier (CircuitVerse#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dishebh committed May 23, 2020
1 parent 76e8a37 commit 66595de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/alu.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ nav_order: 9
## Introduction
An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic operations. It represents the fundamental building block of the central processing unit (CPU) of a computer. Modern CPUs contain very powerful and complex ALUs. In addition to ALUs, modern CPUs contain a control unit (CU).

The purpose of the ALU is to perform mathematical operations such as addition, subtraction, multiplication and division. Additionally, the ALU processes basic logical operations like AND/OR calculations. Also known as the arithmetic logic unit, it serves as the computational hub of the Central Processing Unit (CPU) for a computer system
The purpose of the ALU is to perform mathematical operations such as addition, subtraction, multiplication and division. Additionally, the ALU processes basic logical operations like AND/OR calculations. It serves as the computational hub of the Central Processing Unit (CPU) for a computer system

## In Detail
So with the above building blocks i.e. half adder and full adder discussed in Combinational Analysis, lets construct a simple ALU that performs a arithmetic operation (1 bit addition)and does 3 logical operations namely AND, NOR and XOR as shown below. The multiplexer selects only one operation at a time. The operation selected depends on the selection lines of the multiplexer as shown in the truth table.
So with the above building blocks i.e. half adder and full adder discussed in Combinational Analysis, lets construct a simple ALU that performs a arithmetic operation (1 bit addition) and does 3 logical operations namely AND, NOR and XOR as shown below. The multiplexer selects only one operation at a time. The operation selected depends on the selection lines of the multiplexer as shown in the truth table.

<div style="text-align:center" ><img src="../assets/images/1bitALU.jpg" /></div>

Expand All @@ -45,13 +45,13 @@ Now we can take up the 1 bit ALU as block and construct a 4 bit ALU, which perfo
<div style="text-align:center" ><img src="../assets/images/360px-4BITALU.jpg" /></div>

There are a few important takeaways here:
* The selection lines MO and M1 select the function ALU performs. These selection lines combined with the input arguments and desired functions a Instruction Set can be formed.
* These Instructions can used to create meaningful programs. Since these are required to be easily available they can be stored on ROM unit.
* The selection lines MO and M1 select the function ALU performs. These selection lines combined with the input arguments and desired functions, an Instruction Set can be formed.
* These Instructions can used to create meaningful programs. Since these are required to be easily available, they can be stored on ROM unit.
* The input arguments A and B are often stored in Internal Registers. These along with other special purpose register form the registers of the microcontroller.
* ROM memories are slower in speed, hence an intermediate high speed RAM is often used.
* All the critical timings, decoding of the instructions are often grouped together in seperate control and timings unit'
* If a Micro controller would be constructed only from ALU, RAM, ROM there would not be any external interface. Hence we have Input/Output IO ports.
* Additional features such as 'Interrupts, communication protocols, EEPROM, Timers/Counters, Debug interfaces etc are incorporated to make a controller complete.
* All the critical timings, decoding of the instructions are often grouped together in seperate control and timings unit.
* If a Micro controller would be constructed only from ALU, RAM and ROM, there would not be any external interface. Hence we have Input/Output (I/O) ports.
* Additional features such as Interrupts, communication protocols, EEPROM, Timers/Counters, Debug interfaces etc. are incorporated to make a controller complete.

In above discussion we might have left out intricate details involved in a ALU, CPU design. But the aim was to understand ALU/CPU at a deeper level.

Expand Down

0 comments on commit 66595de

Please sign in to comment.