Higher Institute of Engineering & Technology,
K-Marriot
Communications& Electronics
Logic Circuits – CSE211
Engineering Department
Level 3
Dr. Salah El-Din Abdel Aziz
Digital Fundamentals
ELEVENTH EDITION
Thomas L. Floyd
Number Systems, Operations, and Codes
1-1 Decimal Numbers
The decimal number system has ten digits, 0 through 9. The decimal number system has a base
of 10. The position of each digit in a decimal number indicates the magnitude of the quantity
represented and can be assigned a weight.
=============================================================================
Example 1:
Express the quantity twenty-three
Solution
============================================================================
The weights for whole numbers are positive powers of ten that increase from right to left,
beginning with
For fractional numbers, the weights are negative powers of ten that decrease from left to
right beginning with
Example 2:
==========================================================================
Example 3:
============================================================================
PROBLEMS
1) Determine the value of each digit in 939.
2) Determine the value of each digit in 67.924.
3) What weight does the digit 7 have in each of the following numbers?
(a) 1370 (b) 6725 (c) 7051 (d) 58.72
4) Express each of the following decimal numbers as a sum of the products obtained by
multiplying each digit by its appropriate weight:
(a) 51 (b) 137 (c) 1492 (d) 106.58
1-2 Binary Numbers
binary system has only two digits. The two binary digits (bits) are 1 and 0. the binary system has a
base of 2. The weights in a binary number are based on powers of two.
The weights for whole numbers are positive powers of tow that increase from the right-most bit
is the LSB (least significant bit) and has a weight of .to the left-most bit is the MSB
(most significant bit); its weight depends on the size of the binary number.
For fractional numbers, the weights are negative powers of two that decrease from left to
right beginning with . The left-most bit is the MSB in a binary fractional number and has a
weight of
where n is the number of bits from the binary point.
1-3 Binary-to-Decimal Conversion
The decimal value of any binary number can be found by adding the weights of all bits that
are 1 and discarding the weights of all bits that are 0.
==========================================================================
Example 4:
Convert the binary whole number 1101101 to decimal.
Solution
Determine the weight of each bit that is a 1, and then find the sum of the weights to get
the decimal number.
==========================================================================
Example 5:
Convert the fractional binary number 0.1011 to decimal.
Solution
Determine the weight of each bit that is a 1, and then sum the weights to get the decimal
fraction.
==============================================================================
1-4 Decimal-to-Binary Conversion
1-4-1 Converting Decimal integer to Binary
A method of converting integer numbers from decimal to binary is the repeated division-by-2
process.
=============================================================================
Example 6:
convert the decimal number 12 to binary.
Solution
=============================================================================
Example 7:
=============================================================================
1-4-2 Converting Decimal Fractions to Binary
Decimal fractions can be converted to binary by repeated multiplication by 2.
=============================================================================
Example 8:
Convert the decimal fraction 0.3125 to binary
Solution
==============================================================================
PROBLEMS
1) Convert the binary number 10010001 to decimal.
2) Convert the binary number 10.111 to decimal.
3) Convert the binary number 10111101.011 to decimal.
4) Convert the decimal number 125 to binary.
5) Convert decimal number 39 to binary.
6) Convert each decimal number to binary:
(a) 23 (b) 57 (c) 45.5
7) Convert each decimal number to binary by using the repeated division-by-2 method
(repeated multiplication-by-2 for fractions):
(a) 14 (b) 21 (c) 0.375