ECE 333 Logic Circuit
ECE 333 Logic Circuit
ECE 333 Logic Circuit
7 3 9 2
Decimal numbers are represented by any number from 0-9
multiplied by its positional weight:
The aj coefficients are one of the ten digits (0, 1, 2,…,9)
a5105 + a4104 + a3103 + a2102 + a1101 + a0100 +
a-110-1 + a-210-2 + a-310-3
The decimal number system is said to be of base/radix
10, because it uses ten digits and the coefficients are
multiplied by powers of 10.
BINARY NUMBERS:
1 1 0 1 0 1 1
• 1x24 + 1x23 + 0x22 + 1x21 + 0x20 + 1x2-1 + 1x2-2 = 26.7510
Octal Numbers
3 4 6
• 3x82 + 4x81 + 6x80 = 23010
HEXADECIMAL NUMBERS
2 B 1
• 2x16^2 + 11x16^1 + 1x16^0 = 68910
Other Numbers
• In general, a number expressed in base-r
system has coefficients multiplied by powers
of r:
• The coefficients aj range in value from 0 to r -
1.
• Example: (4021.2)5 = 4x53 + 0x52 +2x51 + 1x50
+2x5-1 = (511.4)10
• Note that coefficients for base 5 can be only 0,
1, 2, 3, and 4.
Number Base Conversion
• Note:
• From any base number to decimal, use
Positional Weight.
• From decimal to any base number, use
division for whole #s or multiplication for
decimal pt.
• From binary to octal, use 421 code
• From binary to Hex, use 8421 code
1-3 Number Base Conversions
Binary to Decimal
• A binary number can be converted to a decimal by
forming the sum of the powers of 2 of those
coefficients whose value is 1.
Example:
(1010.011)2 = 23 + 21 + 2-2 + 2-3
= (10.375)10
• The binary number has four 1’s and the decimal
equivalent is found from the sum of four powers of
2.
• ( 1 0 1 0 . 0 1 1 )2
• 1 x 0.125 = 0.125
• 1 x 0.25 = 0.25
• 0 x 0.5 =0
• 0 x 1 =0
• 1 x 2 =2
• 0 x 4 =0
• 1 x 8 =8
• 10.375
•
Decimal to Binary
• Convert decimal 41 to binary.
– Follow these simple steps:
• To do this, divide 41 by 2 to give an integer quotient of
20 and a remainder of ½.
• The quotient is again divided by 2 to give a new
quotient and remainder.
• This process is continued until the integer quotient
becomes 0.
(The process should be shown on the board)
• Read from right to left
• answer: (101001)2
• Other method: Using positional weight: 32 16 8 4 2 1
• Note:
• If # contains decimal point. Multiply the decimal fraction by the radix.
1-3 Number Base Conversions
• The following is an example of Octal-to-
decimal conversion:
(630.4)8 = 6 x 82 + 3 x 8 + 4 x 8-1
= 408.5
• The conversion from decimal to binary or to
any other base-r system is more convenient if
the number is separated into an integer part
and a fraction part and the conversion of each
part done separately.
1-3 Number Base Conversions
• Convert decimal 153 to octal.
– Follow these simple steps:
• The required base r is 8.
• First, divide 153 by 8 to give an integer quotient of 19
and a remainder of 1.
• Then divide 19 by 8 to give a quotient of 2 and a
remainder of 3.
• Finally, 2 is divided by 8 to give a quotient of 0 and a
remainder of 2.
(Process continued on the board)
1-3 Number Base Conversions
• Convert (0.513) to octal.
– 0.513 x 8 = 4.104
– 0.104 x 8 = 0.832
– 0.832 x 8 = 6.656
– 0.656 x 8 = 5.248
– 0.248 x 8 = 1.984
– 0.984 x 8 = 7.872
• The answer, to seven significant figures, is obtained
from the integer part of the products: (0.513)10 =
(0.406517…)8
1-3 Number Base Conversions
• Convert (0.6875)10 to binary.
INTEGER FRACTION COEFFICIENTS