Professional Documents
Culture Documents
BS IN COMPUTER SCIENCE
Introduction to
arithmetic operations
on number system.
Be able to perform
binary additions.
Be able to compute and
get the result of binary
Computing
subtractions using:
Give the product of
binary numbers using
multiplication
operation.
Show the quotient of Binary Arithmetic Operations
binary divisions.
Apply the 4
fundamental arithmetic
operations on the
different bases in the
number system.
Malimata, Charlyn A.
FOCAL POINTS
Lesson 1 P4
Overview of Arithmetic Logic Unit
?
Lesson 2 P6
Binary Addition
Lesson 3 P10
Binary Subtraction
Lesson 4 P15
Binary Multiplication
INSIDE
Lesson 5 P18
Binary Division
#1
Overview of
Arithmetic
Logic
Unit
Understanding
the
Arithmetic
Logic
Unit
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).
Most of the operations of a CPU are performed by one or more ALUs, which load data from input registers.
A register is a small amount of storage available as part of a CPU. The control unit tells the ALU what
operation to perform on that data, and the ALU stores the result in an output register. The control unit
moves the data between these registers, the ALU, and memory.
4
ALU is also known as an Integer Unit (IU). The arithmetic logic unit is that part of the CPU that
handles all the calculations the CPU may need. Most of these operations are logical in nature.
Depending on how the ALU is designed, it can make the CPU more powerful, but it also consumes
more energy and creates more heat. Therefore, there must be a balance between how powerful
and complex the ALU is and how expensive the whole unit becomes. This is why faster CPUs are
more expensive, consume more power and dissipate more heat.
▪ logical operations − These include operations like AND, OR, NOT, XOR, NOR, NAND, etc.
▪ Bit-Shifting Operations − This pertains to shifting the positions of the bits by a certain
number of places either towards the right or left, which is considered a multiplication or
division operations.
▪ Arithmetic operations − This refers to bit addition and subtraction. Although multiplication
and division are sometimes used, these operations are more expensive to make.
Multiplication and subtraction can also be done by repetitive additions and subtractions
respectively.
5
#2
Binary
Addition
Understanding
Binary
Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given column and
a carry of 1 over to the next column.
7
ASSESSMENT TASK
101010101 2 + 1111111111 2
ANS. ____________________
0.12345 8 + 0.765432 8
ANS. ____________________
123.4567 10 + 987564.25 10
ANS. ____________________
FA.CE 16 + 0.BAD 16
ANS. ____________________
1CE.7EA 16 + C0F.FEE 16
ANS. ____________________
8
#3
Binary
Subtraction
Understanding
Binary
Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary subtraction. There are
four rules of binary subtraction.
10
Subtraction Using 1’s Complement
11
Subtraction Using 2’s Complement
12
ASSESSMENT TASK
13
#4
Binary
Multiplication
Understanding
Binary
Multiplication
Binary multiplication is similar to decimal multiplication. It is simpler than decimal multiplication because
only 0s and 1s are involved. There are four rules of binary multiplication.
15
ASSESSMENT TASK
16
#5
Binary
Division
Understanding
Binary
Division
Binary division is similar to decimal division. It is called as the long division procedure.
Examples
Examples
18
ASSESSMENT TASK
19
SUMMARY
KEY TERMS
20
REFERENCES
Online Resources
▪ Tutorialspoint, “Arithmetic Logic Unit (ALU)”,
https://www.tutorialspoint.com/arithmetic-
logic-unit-alu
21