You are on page 1of 8

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

NUMBERING SYSTEMS
1.0

INTRODUCTION

Many number systems are in use in digital/analogue technology. The most common are:
Decimal
Binary
Hexadecimal

Understanding these numbering systems is important because their use simplifies other
complex topics including boolean algebra and logic design, signed numeric representation,
character codes, and packed data.
1.1

The Decimal Number Base Systems

The Decimal Number System uses base 10. It includes the digits from 0 through 9. The
Decimal Number System has a position value characteristic. The weighted values for each
position is as follows:

10^4

10^3 10^2 10^1 10^0 10^-1 10^-2 10^-3

10000 1000

100

10

.1

.01

.001

The number 123 represents:


1 * 10^2 + 2 * 10^1 + 3 * 10^0 =
1 * 100 + 2 * 10 + 3 * 1 =
100 + 20 + 3 =
123
Each digit appearing to the left of the decimal point represents a value between zero and
nine times power of ten represented by its position in the number. Digits appearing to the

______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

right of the decimal point represent a value between zero and nine times an increasing
negative power of ten.

For example, the value 725.194 is represented as follows:


7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3 =
7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001 =
700 + 20 + 5 + 0.1 + 0.09 + 0.004 =
725.194
1.2

The Binary Number Base Systems

The binary number system works like the decimal number system except the Binary
Number System:

uses base 2

includes only the digits 0 and 1 (any other digit would make the number an
invalid binary number)

The weighted values for each position is determined as follows:


2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
128

64

32

16

To make binary numbers more readable, a space is added every four digits starting from the
least significant digit on the left of the decimal point. For example, the binary value
1010111110110010 will be written 1010 1111 1011 0010.
1.2.1
1.2.1.1

Number Base Conversion


Binary to Decimal

To convert from a binary number to a decimal number, we multiply each digit by its
weighted position, and add each of the weighted values together.
For example, the binary value 1100 1010 represents:
1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 =
1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 =
______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 =
202
1.2.1.2

Decimal to Binary

To convert from decimal to binary; we divide the decimal number by 2, if the remainder is
0, on the side write down a 0. If the remainder is 1, write down a 1. This process is
continued by dividing the quotient by 2 and dropping the previous remainder until the
quotient is 0. When performing the division, the remainders which will represent the binary
equivalent of the decimal number are written beginning at the least significant digit (right)
and each new digit is written to more significant digit (the left) of the previous digit.
Consider the number 83.

Division Quotient Remainder

Binary Number

83 / 2

41

41 / 2

20

11

20 / 2

10

011

10 / 2

0 011

5/2

10 011

2/2

010 011

1/2

1010 011

______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

1.2.2

TOPIC 1: NUMBERING SYSTEMS

Binary Number Formats

We typically write binary numbers as a sequence of bits (bits is short for binary digits). We
have defined boundaries for these bits. These boundaries are:
Name

Size (bits)

Example

Bit

Nibble

0101

Byte

0000 0101

Word

16

0000 0000 0000 0101

Double Word

32

0000 0000 0000 0000 0000 0000 0000 0101

In any number base, we may add as many leading zeroes as we wish without changing its
value. However, we normally add leading zeroes to adjust the binary number to a desired
size boundary.
For example, we can represent the number five as:
Bit

101

Nibble

0101

Byte

0000 0101

Word

0000 0000 0000 0101

We'll number each bit as follows:


1. The rightmost bit in a binary number is referred to as the LSB (least significant
bit).
2. The left-most bit is typically called the MSB (most significant bit).

Exercises:
1. Convert the following binary numbers to their decimal equivalents:
(a) 0001

(b) 0101

______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

(b) 1000

(d) 1011

(e) 1111

(f) 0111

2. Convert the following binary numbers to their decimal equivalents:


(a) l0000000

(b) 00010000

(b) 00110011

(d) 01100100

(e) 00011111

(f) 11111111

3. Convert the following decimal numbers to their binary equivalents:

2.0

(a) 7

(b) 48

(c) 254

(d) 1793

BINARY ARITHMETIC

To explore the basic principles that are needed to understand how digital systems perform
the basic arithmetic operation such as addition, subtraction, multiplication and division.
2.1

BINARY ADDITION

______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

General Principles:
0+0=0
1+0=1
1 + 1 = 10 = 0 + carry of 1 into next position
1 + 1 + 1 = 11 = 1 + carry of 1 into next position
Carry in from
next less
significanct
place

Augend
Addend
Sum

0
+
0

1
1

Augend

111 1
00 1 1 10 1

59

+1

+1

+1

Addend

1
+ 00 1 0 10 1

+42

10

11

Sum

01 1 0 01 0

10110

12
(a) Rules for binary addition

CarryCarry
out to
next more
out
significant
place

(b)Binary addition problem

Figure: 1

2.2 BINARY SUBTRCTION


The rules for binary subtraction are shown in Figure 2(a). The first three rules are the same
as in decimal subtraction. The last rule requires a borrow from the next more significant
place (the 2s place). With the borrow, the minuend becomes binary 10 and the subtrahend is
1 with a difference of 1.
0

1 10

______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

0
10
Minuend
0
1
1
0
Subtrahend - 0 - 1 - 0
-1
Difference
0
0
1
1
(a) Rules for binary subtraction

10 0 10

71

0 1 0 1 0 1 0 1
85
- 0 0 1 1 1 0 1 1
- 57
0 0 0 1 1 1 0 0 2 2810
(b) Binary subtraction problem
Figure: 2

2.3 BINARY MULTIPLICATION


The rules for binary multiplication are shown in Figure: 3. The first two rules need no
explanation. The multiplier is 1 in the latter two rules. When the multiplier is 1 in binary
multiplication, the multiplicand is copied as the product. When the multiplier is 0, the
product is always 0.

Multiplicand
Multiplier
Difference

0
x0
0

1
x0
0

0
x1
0

(a) Rules for binary multiplication

1
x1
1

Multiplicand
Multiplier
First partial product
Second partial product
Third partial product
Final product

1101
X 101
1101
0000
1101
10000012

13
X5
6510

(b) Binary multiplication problem


Figure:3

2.4 BINARY DIVISION


The process for dividing one binary number (dividend) by another (divisor) is the same as
that which is followed for decimal numbers i.e using long division
.
If the divisor is less than or equal to the dividend, the quotient is 1 in that position;
otherwise, the quotient is 0.
divisor

0011
11 1001
011
0011
0011
0000

quotient
dividend

remainder

______________________________________________________________________
Digital Electronics - BED12103

UniKL BMI

TOPIC 1: NUMBERING SYSTEMS

Exercises:
a). Solve the following binary addition problems:
i. 1010 + 0101
ii. 01011011 + 00001111
b). Solve the following binary subtraction problems:
i. 1110 1000
ii. 01100110 00011010
c). Solve the following binary multiplication problems:
i. 1001 x 11
ii. 1111 x 101
d). Solve the following binary division problems:
i. 1001 11

______________________________________________________________________
Digital Electronics - BED12103

You might also like