Number System
Number Systems
Two types of number systems are:
• Non-positional number systems
• Positional number systems
Non-positional Number Systems
Characteristics
• Use symbols such as I for 1, II for 2, III for 3, IIII
for 4, IIIII for 5, etc
• Each symbol represents the same value regardless
of its position in the number
• The symbols are simply added to find out the value
of a particular number
Difficulty
It is difficult to perform arithmetic with such a number
system
Positional Number Systems
Characteristics
• Use only a few symbols called digits
• These symbols represent different values depending on the position
they occupy in the number
The value of each digit is determined by:
1. The digit itself
2. The position of the digit in the number
3. The base of the number system
(base = total number of digits in the number system)
The maximum value of a single digit is always equal to one less than the value of the base
Positional Number Representation
• Unsigned Integers
Numbers that are positive only are called unsigned, and numbers that
can also be negative are called signed
• An n-bit unsigned number is of the form
represents an integer that has the value
Decimal Number System Characteristics
• A positional number system
• Has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).
Hence, its base = 10
• The maximum value of a single digit is 9 (one less than the value of
the base)
Each position of a digit represents a specific power of the base(10)
Binary Number System Characteristics
• A positional number system
• Has only 2 symbols or digits (0 and 1).
Hence its base = 2
• The maximum value of a single digit is 1 (one less
than the value of the base)
• Each position of a digit represents a specific power of the
base (2)
• This number system is used in computers
Octal Number System Characteristics
• A positional number system
• Has total 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7).
Hence, its base = 8
• The maximum value of a single digit is 7 (one less
than the value of the base
• Each position of a digit represents a specific power of
the base (8)
Octal and Hexadecimal Representations
• The positional number representation can be used for any radix. If
the radix is r, then the number
has the value
Different Number Systems
Example. 1. a.Convert the decimal number 3315 to hexadecimal notation.
1.b. What about the hexadecimal equivalent of the decimal number 3315.3?
Soln: CF3
Example. 2. Convert 234.14 expressed in an octal notation to decimal.
2 0 -1 -2
2*8 + 3*8' + 4* 8 +1*8 + 4* 8
=156.1875
Example.3. Convert the hexadecimal number 4B3 to decimal notation. What about the
decimal equivalent of the hexadecimal number 4B3.33?
Example. 4. Convert 234.14 expressed in an octal notation to decimal
Subtraction Using 1’s Complement
Steps
• Obtain the 1’s complement of
the number B
• Add A+B’
• If there is no carry, answer is
(- 1’s complement of the soln)
• If there is a carry, add the
carry(LSB) to obtain the solution
Sub: 22-29 =7
Soln is
-00111
Problem 2: Subtract 45-22
Soln: 23
(10111)b
Subtraction using 2’s Complement
Steps
• Obtain the 2’s complement of the
number B
• Add A+(B’+1)
• If there is no carry, answer is
(- 2’s complement of the soln)
• If there is a carry, ignore the
carry(LSB) to obtain the solution
7’s Complement Method Steps
• Find the 7’s complement of
the number
• Subtract A-B’
• If no carry is generated,
solution is the 7’s
complement of the sum.
• If there is a carry, add LSB to
the result
8’s Complement Method Steps
• Find the 8’s complement of
the number
• Subtract A-(B’+1)
• If no carry is generated,
solution is the 8’s
complement of the sum.
• If there is a carry, ignore the
carry (LSB)
9’s Complement Method Steps
• Find the 9’s complement of
the number
• Subtract A-B’
• If no carry is generated,
solution is the –(9’s)
complement of the sum.
• If there is a carry, add the
carry (LSB) to the soln
10’s Complement Method Steps
• Find the 9’s complement of
the number
• Subtract A-(B’+1)
• If no carry is generated,
solution is the –(10’s)
complement of the sum.
• If there is a carry, ignore the
carry (LSB).
15’s Complement Method Steps
• Find the 9’s complement of
the number
• Subtract A-B’+1
• If no carry is generated,
solution is the –(15’s)
complement of the sum.
• If there is a carry, add the
carry (LSB) to the soln.
16’s Complement Method Steps
• Find the 9’s complement of
the number
• Subtract A-B’+1
• If no carry is generated,
solution is the –(16’s)
complement of the sum.
• If there is a carry, ignore the
carry (LSB).
Addition and Subtraction
Adder and Subtractor Unit
A hierarchical carry-lookahead adder with
ripple-carry between blocks
Fast Adder - Carry Look Ahead Adder
• The addition of binary numbers in parallel implies that all the bits of
and are available for computation at the same time.
• As in any combinational circuit, the signal must propagate through the
gates before the correct output sum is available.
• The output will not be correct unless the signals are given enough
time
to propagate through the gates connected form the input to the
output.
• The longest propagation delay time in an adder is the time it takes
the carry to propagate through the full adders.
The signal form the carry input to the output carry propagates through
an AND gate and an OR gate, which equals 2 gate levels.
o If there are 4 full adders in the binary adder, the output carry would
have 2×4=8 gate levels, form to
o For an -bit adder, gate levels for the carry to propagate form
input to output are required.
The carry propagation time is an important attribute of the
adder because it limits the speed with which two numbers are added.
To reduce the carry propagation delay time:
1) Employ faster gates with reduced delays.
2) Employ the principle of Carry Lookahead Logic.
• Gi - called a carry generate, and it
produces a carry of 1 when both Ai and Bi
are 1.
• Pi called a carry propagate, it determines
whether a carry into stage will propagate
into stage .
• The Boolean function for the carry outputs
of each stage and substitute
the value of each form the previous
equations: