Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CAR 66 Level
Objective
Reference B2
5.2 Numbering Systems 5.2 1
Numbering systems: binary, octal and hexadecimal;
Demonstration of conversions between the decimal and binary, octal
and hexadecimal systems and vice versa.
as great as the digit immediately to its right. The right most digit
of a decimal integer (i.e. a whole number) is the unit’s place (10º),
the digit to its left is the ten’s digit (10¹), the next is the hundred’s
digit (10), and so on. The valid digits in a decimal number are 0 to
5.2 NUMBERING SYSTEMS 9. Figures 2.1 and 2.2 show two examples of how decimal
INTRODUCTION numbers are constructed
The signals in digital logic and computer systems are conveyed
along individual electrical conductors and also using multiple
wiring arrangements where several conductors are used to convey
signals from one place to another in what is known as a bus
system. the number of individual bus lines depends upon the
particular bus standard employed however signals on the
individual lines, no matter what they are used for nor how they are
organised, can exist in only two basic states: logic 0 (‘low’ or
Figure 2.1: An example showing how the decimal number 179
‘off’) or logic 1 (‘high’ or ‘on’). Thus information within a digital
is constructed
system is represented in the form of a sequence of 1s and 0s
known as binary data.
Since binary numbers (particularly large ones) are not very
convenient for human use, we often convert binary numbers to
other forms of number that are easier to recognize and manipulate.
These number systems include hexadecimal (base 16) and octal
(base 8). This chapter is designed to introduce you to the different
types of number system as well as the process of conversion from
one type to another.
DECIMAL NUMBERS Figure 2.2: An example showing how the decimal number 251
The decimal numbers (Denary) that we are all very familiar with is constructed
use the base 10. In this system the weight of each digit is 10 times
Note that we have used the suffix ‘10’ to indicate that the number
is a decimal. So, 17910 and 251 are both decimal (or base 10)
numbers. The use of subscripts helps us to avoid confusion about
what number base we are actually dealing with.
BINARY NUMBERS
In the binary system (base 2), the weight of each digit is two times
as great as the digit immediately to its right. The rightmost digit of BINARY TO DECIMAL CONVERSION
a binary integer is the one’s digit, the next digit to the left is the Figure 2.4
In order to convert : MSB number
a binary and LSBtoinits
Binary Numbers
equivalent decimal F
two’s digit, next is the four’s digit, then the eight’s digit, and so number we can determine the value of each successive binary
on. The valid digits in the binary system are 0 and 1. Figure 2.3 digit, multiply it by the column value (in terms of the power of the
shows an example of a binary number (note the use of the suffix base) and then simply add the values up. For example, to convert
‘2’ to indicate the number base). The binary numbers that are the binary number 1011, we take each digit and multiply it by the
equivalent to the decimal numbers 0 to 9 are shown in Table 2.1. binary weight of the digit position (8, 4, 2 and 1) and add the
Notice how the most significant digit (MSD) is on the left and the result, as shown in Fig. 2.5 below.
least significant digit (LSD) appears on the right. In the table, the
MSD has a weight of 2³ (or 8 in decimal) whilst the LSD has a
weight of 2º (or 1 in decimal). Since the MSD and LSD are
represented by binary digits (either 0 or 1) we often refer to them
as the most significant bit (MSB) and least significant bit (LSB)
respectively, as shown in Fig. 2.4.
Figure 2.5 : Example of Binary to Decimal Conversion
DECIMAL TO BINARY CONVERSION
There are two basic methods for converting decimal numbers to
their equivalent in binary. The first method involves breaking the
number down into a succession of numbers that are each powers
Figure 2.3 : Example of a Binary Number
CATEGORY MODULE REVISION NO. REVISION DATE Page 3 of 10
B2 5.2 1 Aug-2019
THAKUR INSTITUTE OF AVIATION TECHNOLOGY
ONE’S COMPLEMENT
The one’s complement of a binary number is formed by inverting
the value of each digit of the original binary number (i.e. replacing
1s with 0s and 0s with 1s) So, for example, the one’s complement
of the binary number 1010 is simply 0101. Similarly, the one’s
complement of 01110001 is 10001110. Note that if you add the
one’s complement of a number to the original number the result
will be all 1s, as shown in Figure 2.10. Figure 2.10 : The result of adding the one’s complement
of a number to the original number
TWO’S COMPLEMENT
Two’s complement notation is frequently used to represent
negative numbers in computer mathematics (with only one
possible code for zero—unlike one’s complement notation). The
digit to its left is the eight’s digit (8¹), the next is the 64’s digit
(8²), and so on.
OCTAL NUMBERS
The octal number system is used as a more compact way of
representing binary numbers. Because octal consists of eight digits
(0 to 7), a single octal digit can replace three binary digits. Putting
this another way, by arranging a binary number into groups of
three binary digits (or bits) we can replace each group by a single
octal digit, see Figure 2.12, the weight of each digit in an octal
number is eight times as great as the digit immediately to its right.
The rightmost digit of an octal number is the unit’s place (8º), the