Chapter_02 Number Systems Part1
Chapter_02 Number Systems Part1
Lecture Outlines
• Decimal Number System
• Binary Number System
• Binary-to-Decimal Conversion
• Decimal-to-Binary Conversion
• Binary Arithmetic
Decimal Number System
Decimal Number System
Decimal Number System
Decimal Number System
Binary Number System
The binary number system has a base of 2.
a)7 a)0111
b)19 b)10011
c) 28 c) 11100
d)46 d)101110
e)57 e)111001
f) 86 f) 1010110
g)94 g)1011110
h)112 h)1110000
i) 148 i) 10010100
j) 230 j) 11100110
Binary Arithmetic- Binary Addition
Mathematical operations include addition, subtraction, multiplication, and division. Binary addition
follows rules similar to decimal addition. When adding with binary numbers, there are only four
conditions that can occur:
The first three conditions are easy because they are like adding decimals, but the last condition is
slightly different. In decimal, 1 + 1 = 2. In binary, a 2 is written 10. Therefore, in binary, 1 + 1 = 0,
with a carry of 1 to the next most significant place value. When adding larger binary numbers,
the resulting 1s are carried into higher-order columns, as shown in the following examples.
Binary Subtraction
In arithmetic functions, the initial numeric quantities
that are to be combined by subtraction are the minuend
and subtrahend. The result of the subtraction process is
called the difference, represented as:
• A signed binary number consists of both sign and magnitude information. The sign indicates whether a
number is positive or negative, and the magnitude is the value of the number.
• There are three forms in which signed integer (whole) numbers can be represented in binary:
sign-magnitude, 1’s complement, and 2’s complement.
• Of these, the 2’s complement is the most important and the sign-magnitude is the least used.
• Noninteger and very large or small numbers can be expressed in floating-point format.
The Decimal Value of Signed Numbers
Addition
The two numbers in an addition are the addend and the augend. The result is the sum.
• Addition of two positive numbers yields a positive number.
• Addition of a positive number and a smaller negative number yields a positive
number.
• Addition of a positive number and a larger negative number or two negative numbers
yields a negative number in 2’s complement.
There are four cases that can occur when two signed binary numbers are added.
1. Both numbers positive
2. Positive number with magnitude larger than negative number
3. Negative number with magnitude larger than positive number
4. Both numbers negative
Overflow Condition
An overflow can occur only when both
numbers are positive or both
numbers are negative.
Subtraction Subtraction is addition with the sign of the subtrahend changed.
The numbers in a multiplication are the multiplicand, the multiplier, and the product. These
are illustrated in the following decimal multiplication:
Direct addition and partial products are two basic methods for performing multiplication
using addition. In the direct addition method, you add the multiplicand a number of times
equal to the multiplier.
In the previous decimal example (8 * 3), three multiplicands are added: 8 + 8 + 8 = 24. The
disadvantage of this approach is that it becomes very lengthy if the multiplier is a large
number.
For example, to multiply 350 * 75, you must add 350 to itself 75 times. Incidentally, this is
why the term times is used to mean multiply.
Partial Products
In partial products method, the multiplicand is multiplied by each multiplier
digit beginning with the least significant digit.
The result of the multiplication of the multiplicand by a multiplier digit is called
a partial product.
Each successive partial product is moved (shifted) one place to the left and
when all the partial products have been produced, they are added to get the
final product.
If the signs are the same, the product is positive.
If the signs are different, the product is negative.
Steps for signed numbers Division
Hexadecimal-to-Binary Conversion
To convert from a hexadecimal number to a binary number, reverse the process and replace
each hexadecimal symbol with the appropriate four bits.
Hexadecimal is a convenient way to represent binary numbers.
Hexadecimal-to-Decimal Conversion
One way to find the decimal equivalent of a hexadecimal number is to first convert the
hexadecimal number to binary and then convert from binary to decimal.
Another way to convert a hexadecimal number to its decimal equivalent is to
multiply the decimal value of each hexadecimal digit by its weight and then take
the sum of these products. The weights of a hexadecimal number are increasing
powers of 16 (from right to left).
For a 4-digit hexadecimal number, the weights are
Decimal-to-Hexadecimal Conversion
Hexadecimal Addition
Addition can be done directly with hexadecimal numbers by remembering that the
Hexadecimal digits 0 through 9 are equivalent to decimal digits 0 through 9 and that
hexadecimal digits A through F are equivalent to decimal numbers 10 through 15.
When adding two hexadecimal numbers, use the following rules. (Decimal numbers
are indicated by a subscript 10.)
Hexadecimal Subtraction