Industrial - Lecture 2 - Number Systems
Industrial - Lecture 2 - Number Systems
Industrial - Lecture 2 - Number Systems
LECTURE 2:
NUMBER SYSTEMS
CONTENT
Decimal Numbers
Binary Numbers
Decimal-to-Binary Conversion
Binary Arithmetic
Complements of Binary Numbers
Hexadecimal Numbers
Octal Numbers
Binary Coded Decimal (BCD)
References
INTRODUCTION
The binary number system and digital codes are
fundamental to computers and to digital electronics
in general.
Question 01
Determine the value of each digit in 939.
Example 02
Express the decimal number 568.23 as a sum of the
values of each digit.
Question 02
Determine the value of each digit in 67.924
BINARY NUMBERS
The binary number system is another way to
represent quantities.
It has only two digits (bits), 1 and 0
Include another
digit position and
continue: 10, 11
Question 03
Convert the binary number 10010001 to decimal.
Example 04
Convert the fractional binary number 0.1011 to
decimal.
Question 04
Convert the binary number 10.111 to decimal.
CHECKUP QUESTIONS
1. What is the largest decimal number that can be
represented in binary with eight bits?
2. Determine the weight of the 1 in the binary
number 10000.
3. Convert the binary number 10111101.011 to
decimal
DECIMAL-to-BINARY CONVERSION
Three main methods can be used for conversion
1. The sum-of-weights method
Question
Convert the decimal number 125 to binary
Repeated Division-by-2 Method
To get the binary number for a given decimal
number, divide the decimal number by 2 until the
quotient is 0. Remainders form the binary number
Question
Convert decimal number 39 to binary
Repeated Multiplication by 2
Decimal fractions can be converted to binary by
repeated multiplication by 2
For example, to convert the decimal fraction
0.3125 to binary, begin by multiplying 0.3125 by
2 and then multiplying each resulting fractional
part of the product by 2 until the fractional
product is zero or until the desired number of
decimal places is reached
The carry digits, or carries, generated by the
multiplications produce the binary number.
The first carry produced is the MSB, and the last
carry is the LSB.
Illustration
Converting Decimal Fractions to Binary
Sum-of-Weights Method can be applied to
fractional decimal numbers, as shown in the
following example:
Solution
Octal Numbers
The octal number system is composed of eight
digits, which are; 0, 1, 2, 3, 4, 5, 6, 7
Solution
Decimal-to-Octal Conversion
A method of converting a decimal number to an
octal number is the repeated divisionby-8 method
Example 19: Converting Decimal 359 to octal
Octal-to-Binary Conversion
Each octal digit is represented by three bits as
shown in the table hereafter.