Unit 3
Unit 3
UNIT - III
List of Topics
Data Representation: Data types, Complements, Fixed Point
Representation, Floating Point Representation.
G.SWARNALATHA,Asst.Professor, GNITC
III Data Representation
CONTENTS
• The digital computer is a digital system that performs various computational tasks.
• The word digital implies that the information in the computer is represented
by variables that take a limited number of discrete values.
• Digital computers use the binary number system, which has two digits: 0
and 1.
• A binary digit is called a bit. Information is represented in digital computers
in groups of bits. Represent binary numbers, discrete symbols - decimal
digits or letters of the alphabet.
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
NUMBER SYSTEM
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
Complements
• The input and output devices connected to the computer include
keyboards, printers, terminals, magnetic disk drives, and other
communication devices.
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
EXAMPLE
• Register Transfer
• Arithmetic Microoperations
• Logic Microoperations
• Shift Microoperations
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
Fixed-point Representation
Integer Representation
When an integer binary number is positive, the sign is represented by 0 and the magnitude by a positive
binary number. When the number is negative, the sign is represented by 1 but the rest of the number may be
represented in one of three possible ways:
1.Signed-magnitude representation
2.Signed-1’s complement representation
3.Signed 2’s complement representation
As an example, consider the signed number 14 stored in an 8-bit register. +14 is represented by a sign
bit of 0 in the leftmost position followed by the binary equivalent of 14:00001110.
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
Arithmetic Addition
- Set of registers and their functions
- Microoperations set
- Control signals that initiate the sequence of microoperations (to perform the functions)
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Data Representation
Arithmetic Subtraction
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
Topic 2 : Contents
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
Multiplication Algorithms
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
Division Algorithms
Division of two fixed-point binary numbers in signed-magnitude representation is
done with paper and pencil by a process of successive compare, shift, and subtract
operations. The same is represented in the figure below.
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
EXAMPLE:
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
Addition and Subtraction operations
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
R1 M[MAR]
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
Multiplication operation
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
Division operation
The division algorithm can be subdivided into five parts:
1.Check for zeros.
2.Initialize registers and evaluate the sign.
3.Align the dividend.
4.Subtract the exponents.
5.Divide the mantissas.
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III MICROOPERATIONS
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III ARITHMETIC MICROOPERATIONS
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III ARITHMETIC MICROOPERATIONS
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
BCD Subtraction
A straight subtraction of two decimal numbers is by taking
the 9’s or 10’s complement of the subtrahend and adding it to
the minuend. Since the BCD is not a self-complementing code,
the 9’s complement cannot be obtained by complementing
each bit in the code. It must be formed by a circuit that
subtracts each BCD digit from 9.
G.SWARNALATHA,Asst.Professor, GNITC
UNIT-I
III Computer Arithmetic
x1 = B I 1
x2 = B 2
x4 =(B4 XOR B2)
x8 = B I 8 B I 4 B I 2
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
Decimal arithmetic microoperation symbols
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
MULTIPLICATION
Registers for arithmetic multiplication and division
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
Division
Floe chart for Decimal Division
G.SWARNALATHA,Asst.Professor, GNITC
III Computer Arithmetic
G.SWARNALATHA,Asst.Professor, GNITC