Module 1 - Number System
Module 1 - Number System
DIGITAL SYSTEMS
Digital systems have such a prominent role in everyday life that we refer to
the present technological period as the digital age. Digital systems are used
in communication, business transactions, traffic control, spacecraft
guidance, medical treatment, weather monitoring, the Internet, and many
other commercial, industrial, and scientific enterprises.
We have digital telephones, digital televisions, digital versatile discs, digital
cameras, handheld devices, and, of course, digital computers. We enjoy
music downloaded to our portable media player and other handheld devices
having high resolution displays.
These devices have graphical user interfaces (GUIs), which enable them to
execute commands that appear to the user to be simple, but which, in fact,
involve precise execution of a sequence of complex internal instructions.
Most, if not all, of these devices have a special‐purpose digital computer
embedded within them. The most striking property of the digital computer is
its generality. It can follow a sequence of instructions, called a program, that
operates on given data. The user can specify and change the program or the
data according to the specific need. Because of this flexibility, general‐
purpose digital computers can perform a variety of information‐processing
tasks that range over a wide spectrum of applications.
Number System
Example 1:
Consider an arbitrary number system with the independent digits as 0,
1 and X. What is the radix of this number system? List the first 10
numbers in this number system.
Solution
❖ The radix of the proposed number system is 3.
❖ The first 10 numbers in this number system would be
0, 1, X, 10, 11, 1X, X0, X1, XX and 100.
Decimal Binary 3-bit binary 4-bit binary
0 0 000 0000
1 1 001 0001
2 10 010 0010
3 11 011 0011
4 100 100 0100
5 101 101 0101
6 110 110 0110
7 111 111 0111
Sign-Bit Magnitude
• In the sign-bit magnitude representation of positive and
negative decimal numbers, the MSB represents the ‘sign’, with
a ‘0’ denoting a plus sign and a ‘1’ denoting a minus sign. The
remaining bits represent the magnitude.
• In eight-bit representation, while MSB represents the sign, the
remaining seven bits represent the magnitude.
For example, the eight-bit representation of:
+12 would be 00001100, and that
−12 would be 10001100.
• An n−bit binary representation can be used to represent
decimal numbers in the range of −(2n−1−1) to +(2n−1−1).
• That is, eight-bit representation can be used to represent
decimal numbers in the range from −127 to +127 using the
sign-bit magnitude format.
1’s Complement
• In the 1’s complement format, the positive numbers remain
unchanged. The negative numbers are obtained by taking the
1’s complement of the positive counterparts.
For example,
+12 will be represented as 00001100 in eight-bit notation, and
−12 will be represented as 11110011, which is the 1’s
complement of 00001100.
• Again, n-bit notation can be used to represent numbers in the
range from −(2n−1−1) to +(2n−1−1) using the 1’s complement
format.
• The eight-bit representation of the 1’s complement format can
be used to represent decimal numbers in the range from −127
to +127.
2’s Complement
• In the 2’s complement representation of binary numbers, the
MSB represents the sign, with a ‘0’used for a plus sign and a
‘1’ used for a minus sign. The remaining bits are used for
representing magnitude.
• Positive magnitudes are represented in the same way as in the
case of sign-bit or 1’s complement representation.
• Negative magnitudes are represented by the 2’s complement
of their positive counterparts.
For example,
+12 would be represented as 00001100, and
−12 would be written as 11110100. (11110011 plus 1)
Binary-to-Decimal Conversion
The decimal equivalent of the binary number (1100.0101)2 is
determined as follows:
• The integer part = 1100
The decimal equivalent
= (1 × 23) + (1 × 22) + (0 × 21) + (0 × 20)
= 8 + 4 + 0 + 0 = 12
Octal-to-Decimal Conversion
The decimal equivalent of the octal number (137.21)8 is determined as
follows:
• The integer part = 137
The decimal equivalent
= (1 × 82) + (3 × 81) + (7 × 80)
= 64 + 24 + 7 = 95
• The fractional part = .21
The decimal equivalent
= (2 × 8−1) + (1 × 8−2)
= 0.25 + 0.0156 = 0.2656
Hexadecimal-to-Decimal Conversion
The decimal equivalent of the hexadecimal number (1E0.2A)16 is
determined as follows:
• The integer part = 1E0
• The decimal equivalent
= (1 × 162) + (14 × 161) + (0 × 160)
= 256 + 224 + 0 = 480
• The fractional part = .2A
• The decimal equivalent
= (2 × 16−1) + (10 × 16−2) = 0.164
Example
Find the decimal equivalent of the following binary numbers expressed
in the 2’s complement format:
(a) 00001110;
(b) 10001110.
Solution
(a) The MSB bit is ‘0’, which indicates a plus sign.
The magnitude bits are 0001110.
The decimal equivalent
= (0×26)+(0×25)+(0×24)+(1×23)+(1×22)+(1×21)+(0×20)
= 0+0+0+8+4+2+0 = 14
Example:
Convert the decimal number 53 to base 7.
Solution:
Decimal-to-Binary Conversion
For the integer part,
➢ the binary equivalent can be found by successively dividing the
integer part of the number by 2 and recording the remainders
until the quotient becomes ‘0’.
➢ The remainders written in reverse order constitute the binary
equivalent.
Example:
Find the binary equivalent of (13.375)10.
Solution:
• The integer part = 13
Dividend Divisor Remainder
13 2 1
6 2 0
3 2 1
1 2 1
0
Decimal-to-Octal Conversion
• The process of decimal-to-octal conversion is similar to that of
decimal-to-binary conversion.
• The progressive division in the case of the integer part and the
progressive multiplication while working on the fractional part
here are by ‘8’ which is the radix of the octal number system.
• Again, the integer and fractional parts of the decimal number
are treated separately.
Example 1.4
Find the octal equivalent of (73.75)10.
Solution
• The integer part = 73
Dividend Divisor Remainder
73 8 1
9 8 1
1 8 1
0
Decimal-to-Hexadecimal Conversion
• The process of decimal-to-hexadecimal conversion is also
similar.
• Since the hexadecimal number system has a base of 16, the
progressive division and multiplication factor in this case is 16.
Example:
Determine the hexadecimal equivalent of (82.25)10.
Solution
• The integer part = 82
Dividend Divisor Remainder
82 16 2
5 16 5
0
Example:
Find the
a. binary equivalent of (374.26)8
b. octal equivalent of (1110100.0100111)2
Solution:
• The given octal number = (374.26)8
3 7 4 . 2 6
011 111 100 . 010 110
Example:
Find the
a. binary equivalent of (17E.F6)16
b. hex equivalent of (1011001110.011011101) 2
Solution:
• The given hex number = (17E.F6)16
1 7 E . F 6
0001 0111 1110 . 1111 0110
Example:
Find the
a. octal equivalent of (2F.C4)16
b. hex equivalent of (762.013)8
Solution:
• The given hex number = (2F.C4)16.
2 F . C 4
0010 1111 . 1100 0110
7 6 2 . 0 1 3
111 110 010 . 000 001 011
Activity 1D