0% found this document useful (0 votes)
17 views11 pages

Number Systems

The document discusses various number systems essential for data representation in digital electronics, including the decimal, binary, octal, and hexadecimal systems. It explains the structure and conversion methods between these systems, highlighting the significance of the binary system in computing. Additionally, it covers floating-point notation for representing large and small numbers efficiently.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views11 pages

Number Systems

The document discusses various number systems essential for data representation in digital electronics, including the decimal, binary, octal, and hexadecimal systems. It explains the structure and conversion methods between these systems, highlighting the significance of the binary system in computing. Additionally, it covers floating-point notation for representing large and small numbers efficiently.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

NUMBER SYSTEMS

9.1 INTRODUCTION

The study of number systems is important from the viewpoint of


understanding how data are represented before they can be processed by any digital
system including a digital computer. It is one of the most basic topics in digital
electronics. In this chapter we will discuss different number systems commonly used to
represent data. We will begin the discussion with the decimal number system. Although
it is not important from the viewpoint of digital electronics, a brief outline of this will be
given to explain some of the underlying concepts used in other number systems. This
will then be followed by the more commonly used number systems such as the binary,
octal and hexadecimal number systems.

9.2 LECTURE OBJECTIVES

By end of lecture learner should be able to

❖ discuss Decimal Number System


❖ discuss the Binary Number System
❖ discuss the other number systems
9.3 DECIMAL NUMBER SYSTEM

The decimal number system is a radix-10 number system and therefore has 10 different digits or
symbols. These are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. All higher numbers after ‘9’ are represented in
terms of these 10 digits only. The process of writing higher-order numbers after ‘9’ consists in
writing the second digit (i.e. ‘1’) first, followed by the other digits, one by one, to obtain the next
10 numbers from ‘10’ to ‘19’. The next 10 numbers from ‘20’ to ‘29’ are obtained by writing the
third digit (i.e. ‘2’) first, followed by digits ‘0’ to ‘9’, one by one. The process continues until we
have exhausted all possible two-digit combinations and reached ‘99’. Then we begin with three-
digit combinations. The first three-digit number consists of the lowest two-digit number followed
by ‘0’ (i.e. 100), and the process goes on endlessly.

9.4 BINARY NUMBER SYSTEM

The binary number system is a radix-2 number system with ‘0’ and ‘1’ as the two independent
digits. All larger binary numbers are represented in terms of ‘0’ and ‘1’. The procedure for
writing higher order binary numbers after ‘1’ is similar to the one explained in the case of the
decimal number system. For example, the first 16 numbers in the binary number system would
be 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111. The
next number after 1111 is 10000, which
is the lowest binary number with five digits. This also proves the point made earlier that a
maximum of only 16 (= 24) numbers could be written with four digits. Starting from the binary
point, the place values of different digits in a mixed binary number are 20, 21, 22 and so on (for
the integer part) and 2-1, 2-2, 2-3 and so on (for the fractional part).

Example 9.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.

Logic operations are the backbone of any digital computer, although solving a problem on
computer could involve an arithmetic operation too. The introduction of the mathematics of logic
by George Boole laid the foundation for the modern digital computer. He reduced the
mathematics of logic to a binary notation of ‘0’ and ‘1’. As the mathematics of logic was well
established and had proved itself to be quite useful in solving all kinds of logical problem, and
also as the mathematics of logic (also known as Boolean algebra) had been reduced to a binary
notation, the binary number system had a clear edge over other number systems for use in
computer systems. Yet another significant advantage of this number system was that all kinds of
data could be
Conveniently represented in terms of 0s and 1s. Also, basic electronic devices used for hardware
implementation could be conveniently and efficiently operated in two distinctly different modes.
For example, a bipolar transistor could be operated either in cut-off or in saturation very
efficiently. Lastly, the circuits required for performing arithmetic operations such as addition,
subtraction, multiplication, division, etc., become a simple affair when the data involved are
represented in the form of 0s and 1s.

9.5 OCTAL NUMBER SYSTEM

The octal number system has a radix of 8 and therefore has eight distinct digits. All higher-order
numbers are expressed as a combination of these on the same pattern as the one followed in the
case of the binary and decimal number systems described in Sections 1.3 and 1.4. The
independent digits are 0, 1, 2, 3, 4, 5, 6 and 7. The next 10 numbers that follow ‘7’, for example,
would be 10, 11, 12, 13, 14, 15, 16, 17, 20 and 21. In fact, if we omit all the numbers containing
the digits 8 or 9, or both, from the decimal number system, we end up with an octal number
system. The place values for the different digits in the octal number system are 80, 81, 82 and so
on (for the integer part) and 8-1, 8-2, 8-3 and so on (for the fractional part).

9.6 HEXADECIMAL NUMBER SYSTEM

The hexadecimal number system is a radix-16 number system and its 16 basic digits are 0, 1, 2,
3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. The place values or weights of different digits in a mixed
hexadecimal number are 160, 161, 162 and so on (for the integer part) and 16-1, 16-2, 16-3 and so
on (for the fractional part). The decimal equivalent of A, B, C, D, E and F are 10, 11, 12, 13, 14
and 15 respectively, for obvious reasons. The hexadecimal number system provides a condensed
way of representing large binary numbers stored and processed inside the computer. One such
example is in representing addresses of different memory locations. Let us assume that a
machine has 64K of memory. Such a memory has 64K (= 216 = 65 536) memory locations and
needs 65 536 different addresses. These addresses can be designated as 0 to 65 535 in the
decimal number system and 00000000 00000000 to 11111111 11111111 in the binary number
system. The decimal number system is not used in computers and the binary notation
here appears too cumbersome and inconvenient to handle. In the hexadecimal number system, 65
536 different addresses can be expressed with four digits from 0000 to FFFF. Similarly, the
contents of the memory when represented in hexadecimal form are very convenient to handle.
9.7 NUMBER SYSTEMS – SOME COMMON TERMS

In this section we will describe some commonly used terms with reference to different number
systems.

9.7.1 BINARY NUMBER SYSTEM

Bit is an abbreviation of the term ‘binary digit’ and is the smallest unit of information. It is either
‘0’ or ‘1’. A byte is a string of eight bits. The byte is the basic unit of data operated upon as a
single unit in computers. A computer word is again a string of bits whose size, called the ‘word
length’ or ‘word size’, is fixed for a specified computer, although it may vary from computer to
computer. The word length may equal one byte, two bytes, four bytes or be even larger. The 1’s
complement of a binary number is obtained by complementing all its bits, i.e. by replacing 0s
with 1s and 1s with 0s. For example, the 1’s complement of (10010110)2 is (01101001)2. The
2’s complement of a binary number is obtained by adding ‘1’ to its 1’s complement. The 2’s
complement of (10010110)2 is (01101010)2.

9.7.2 DECIMAL NUMBER SYSTEM

Corresponding to the 1’s and 2’s complements in the binary system, in the decimal number
system we have the 9’s and 10’s complements. The 9’s complement of a given decimal number
is obtained by subtracting each digit from 9. For example, the 9’s complement of (2496)10
would be (7503)10. The 10’s complement is obtained by adding ‘1’ to the 9’s complement. The
10’s complement of (2496)10is (7504)10.
9.7.3 OCTAL NUMBER SYSTEM

In the octal number system, we have the 7’s and 8’s complements. The 7’s complement of a
given octal number is obtained by subtracting each octal digit from 7. For example, the 7’s
complement of (562)8 would be (215)8. The 8’s complement is obtained by adding ‘1’ to the 7’s
complement. The 8’s complement of (562)8 would be (216)8.

9.7.4 HEXADECIMAL NUMBER SYSTEM

The 15’s and 16’s complements are defined with respect to the hexadecimal number system. The
15’s complement is obtained by subtracting each hex digit from 15. For example, the 15’s
complement of (3BF)16 would be (C40)16. The 16’s complement is obtained by adding ‘1’ to
the 15’s complement. The 16’s complement of (2AE)16 would be (D52)16.

9.8.1 DECIMAL-TO-BINARY CONVERSION

As outlined earlier, the integer and fractional parts are worked on separately. 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. For the fractional part, it is found by successively
multiplying the fractional part of the decimal number by 2 and recording the carry until the result
of multiplication is ‘0’. The carry sequence written in forward order constitutes the binary
equivalent of the fractional part of the decimal number. If the result of multiplication does not
seem to be heading towards zero in the case of the fractional part, the process may be continued
only until the requisite number of equivalent bits has been obtained. This method of decimal–
binary conversion is popularly known as the double-dabblemethod. The process can be best
illustrated with the help of an example.

Example 9.2
We will find the binary equivalent of (13.375)10.
Solution
• The integer part = 13

• The binary equivalent of (13)10 is therefore (1101)2


• The fractional part = .375
• 0.375 × 2 = 0.75 with a carry of 0
• 0.75 × 2 = 0.5 with a carry of 1
• 0.5 × 2 = 0 with a carry of 1
• The binary equivalent of (0.375)10 = (.011)2
• Therefore, the binary equivalent of (13.375)10 = (1101.011)2

9.9 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. The process
can be best illustrated with the help of an example.

Example 9.3
We will find the octal equivalent of (73.75)10
Solution
• The integer part = 73

• The octal equivalent of (73)10 = (111)8


• The fractional part = 0.75
• 0.75 × 8 = 0 with a carry of 6
• The octal equivalent of (0.75)10 = (.6)8
• Therefore, the octal equivalent of (73.75)10= (111.6)8

9.10 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. The process is illustrated further with the help of an example.

Example 9.4
Let us determine the hexadecimal equivalent of (82.25)10_
Solution
• The integer part = 82
• The hexadecimal equivalent of (82)10 = (52)16
• The fractional part = 0.25
• 0.25 × 16 = 0 with a carry of 4
• Therefore, the hexadecimal equivalent of (82.25)10 = (52.4)16

9.11 FLOATING-POINT NUMBERS

Floating-point notation can be used conveniently to represent both large as well as small
fractional or mixed numbers. This makes the process of arithmetic operations on these numbers
relatively much easier. Floating-point representation greatly increases the range of numbers,
from the smallest to the largest, that can be represented using a given number of digits. Floating-
point numbers are in general expressed in the form
N = m×be
where m is the fractional part, called the significand or mantissa, e is the integer part, called the
exponent, and b is the base of the number system or numeration. Fractional part m is a p-digit
number of the form (±d.dddd _ _ _ dd), with each digit d being an integer between 0 and b – 1
inclusive. If the leading digit of m is nonzero, then the number is said to be normalized. Equation
bellow in the case of decimal, hexadecimal and binary number systems will be written as
follows:

Decimal system
N = m×10e
Hexadecimal system
N = m×16e
Binary system
N = m×2e

For example, decimal numbers 0.0003754 and 3754 will be represented in floating-point notation
as 3.754 × 10-4 and 3.754 × 103 respectively. A hex number 257.ABF will be represented as
2.57ABF × 162. In the case of normalized binary numbers, the leading digit, which is the most
significant bit, is always ‘1’ and thus does not need to be stored explicitly. Also, while
expressing a given mixed binary number as a floating-point number, the radix point is so shifted
as to have the most significant bit immediately to the right of the radix point as a ‘1’. Both the
mantissa and the exponent can have a positive or a negative value. The mixed binary number
(110.1011)2 will be represented in floating-point notation as .1101011 × 23 = .1101011e+0011.
Here, .1101011 is the mantissa and e+0011 implies that the exponent is +3. As another example,
(0.000111)2 will be written as .111e-0011, with .111 being the mantissa
and e-0011 implying an exponent of -3. Also, (-0.00000101)2 may be written as -.101 × 2-5 = -
.101e-0101, where -.101 is the mantissa and e-0101 indicates an exponent of -5. If we wanted to
represent the mantissas using eight bits, then .1101011 and .111 would be represented as
.11010110 and .11100000.

You might also like