Number Systems
Number Systems
SYSTEMS
LOGIC CIRCUIT AND SWITCHING THEORY
ENGR. MARCO U. FIGUEROA
Objectives
After studying this unit, you will be able to:
• Discuss the decimal number system
• Explain about the binary number system
• Discuss the hexadecimal number system
• Discuss the octal number system
• Understand the method of conversion from one number
system to another
INTRODUCTION
• We are familiar with the decimal number system in which
digits are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. The computer uses
binary digits for its operation. In the binary system there are
only two digits 0 and 1. The programmer feeds instruction
and data in alphabets and decimal digits. But for the
operation of the computer these are converted to binary
bits.
INTRODUCTION
• Non-Positional Number Systems
• Positional Number Systems
DECIMAL NUMBER SYSTEM
The decimal number system is composed of 10 numerals or
symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9;
using these symbols as digitals of a number, we can express
any quantity. The decimal system, also called the base-10
system because it has 10 digits, has evolved naturally as a
result of the fact that man has 10 fingers.
DECIMAL NUMBER SYSTEM
Decimal Counting: When counting, in the decimal system, we
start with 0 in the unit’s position and take each symbol (digit)
in progression until we reach 9. Then we add a 1 to the next
higher position and start over with zero in the first position
(see Figure 1.1). This process continues until the count of 99
is reached. Then we add first to the third position and start
over with zeros in the first two positions. The same pattern is
followed continuously as high as we wish to count.
DECIMAL NUMBER SYSTEM
BINARY NUMBER SYSTEM
In the binary system there are only two symbols or possible
digit values, 0 and 1. Even so, this base-2 system can be
used to represent any quantity that can be represented in
decimal or other number systems. In general though, it will
take a greater number of binary digits to express a given
quantity.
BINARY NUMBER SYSTEM
All the statements made earlier concerning the decimal
system are equally applicable to the binary system. The
binary system is also a positional-value system, wherein each
binary digit has its own value or weight expressed as a power
of 2. This is illustrated in Figure 1.2. Here, places to the left of
the binary point (Counterpart of the decimal point) are
positive powers of 2 and places to the right are negative
powers of 2.
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
In the binary system, the term binary digit is often
abbreviated to the term bit, which we will use henceforth.
Thus, in the number expressed in Figure 1.2 there are 4 bits
to the left of the binary point, representing the integer part
of the number, and 3 bits to the right of the binary point,
representing the fractional part. The most significant bit
(MSB) is the leftmost bit (largest weight). The least
significant bit. (LSB) is the rightmost bit (smallest weight).
These are indicated in Figure 1.2.
BINARY NUMBER SYSTEM
Binary Counting: When we deal with binary numbers, we will
usually be restricted to a specific number of bits. This
restriction is based on the circuitry that is used to represent
these binary numbers. Let us use 4-bit binary numbers to
illustrate the method for counting in binary.
BINARY NUMBER SYSTEM
HEXADECIMAL NUMBER SYSTEM
The hexadecimal number system is used as an intermediary
system in computers, such as are presentation of memory
addresses or a representation of colours. The hexadecimal
number system is also known as the base-16 number
system, because each position in the number represents an
incremental number with a base of 16 (see Table 1.1).
HEXADECIMAL NUMBER SYSTEM
OCTAL NUMBER SYSTEM
Just as the decimal system with its ten digits is a base-ten
system, the octal number system with its 8 digits, ‘0’, ‘1’, ‘2’,
‘3’, ‘4’, ‘5’, ‘6’ and ‘7’, is a base-eight system. Table 1.2 shows
the weighting for the octal number system up to 3 decimal
places before and 2 decimal places after the octal point (.).
OCTAL NUMBER SYSTEM
OCTAL NUMBER SYSTEM
Base (Radix)
As with the other systems, the radix, or base, is the number of
symbols used in the system. The octal system uses eight
symbols—0 through 7. The base, or radix, is indicated by the
subscript 8.
Positional Notation
The octal number system is a positional notation number system.
Just as the decimal system uses powers of 10 and the binary
system uses powers of 2, the octal system uses power of 8 to
determine the value of a number’s position.
OCTAL NUMBER SYSTEM
Conversion from One Number
System to Another
1.5.1 Converting from Another Base to Decimal
The following steps are used to convert a number in any
other base to a base 10 (decimal) number:
Step 1: Determine the column (positional) value of each digit
(this depends on the position of the digit and the base of the
number system).
Step 2: Multiply the obtained column values (in Step 1) by
the digits in the corresponding columns. Step 3: Sum up the
products calculated in Step 2. The total is the equivalent
value in decimal.
Conversion from One Number
System to Another
1.5.2 Converting from Decimal to Another Base (Division-Remainder
Technique)
The following steps are used to convert a base 10 (decimal) number to
a number in another base
Step 1: Divide the decimal number by the value of the new base.
Step 2: Record the remainder from Step 1 as the rightmost digit (least
significant digit) of the new base number.
Step 3: Divide the quotient of the previous division by the new base.
Step 4: Record the remainder from Step 3 as the next digit (to the left)
of the new base number. Repeat Steps 3 and 4, recording remainders
from right to left, until the quotient becomes zero in Step 3.
Note that the last remainder, thus obtained, will be the most significant
digit of the new base number.
Conversion from One Number
System to Another
1.5.3 Converting from a Base Other Than 10 to Another Base
Other Than 10
The following steps are used to convert a number in a base
other than 10, to number base other than 10:
Step 1: Convert the original number to a base (decimal)
number.
Step 2: Convert the decimal number obtained in step 1 to the
new base number.
Conversion from One Number
System to Another
1.5.4 Short-cut Method for Binary to Octal Conversion
The following steps are used in this method:
Step 1: Divide the binary digits into groups of three (starting
from the right)
Step 2: Convert each group of three binary digit to one octal
digit. Since there are only 8 digits (0 to 7) in octal number
system, 3 bits (23 = 8) are sufficient to represent any octal
number in binary to decimal conversion method in this step.
Conversion from One Number
System to Another
1.5.5 Short-cut Method for Octal to Binary Conversion
The following steps are used in this method:
Step 1: Convert each octal digit to a 3 digit binary number
(the octal digits may be treated as decimal numbers for this
conversion).
Step 2: Combine all the resulting binary groups (of 3 digits
each) into a single binary number.
Conversion from One Number
System to Another
1.5.6 Short-cut Method for Binary to Hexadecimal
Conversion
The following steps are used in this method:
Step 1: Divide the binary digits into groups of four (starting
from the right).
Step 2: Convert each group of four binary digits to one
hexadecimal digit. Remember that hexadecimal digits 0 to 9
are equal to decimal digits 0 to 9 and hexadecimal digits A to
F are equal to decimal values 10 to 15. Hence, for this step,
we use binary to decimal conversion procedure and
represent decimal values 10 to 15 as hexadecimal A to F.
Conversion from One Number
System to Another
1.5.7 Short-cut Method for Hexadecimal to Binary
Conversion
The following steps are used in this method:
Step 1: Convert decimal equivalent of each hexadecimal digit
to 4 binary digits.
Step 2: Combine all resulting binary groups (4 digits each)
into a single binary number.
Conversion from One Number
System to Another
THANK YOU!