ebook img

• Conversion between number systems: • Binary arithmetic PDF

79 Pages·2002·0.16 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview • Conversion between number systems: • Binary arithmetic

• Conversion between number systems: – Radix-r to decimal. – Decimal to binary. – Decimal to Radix-r – Binary to Octal – Binary to Hex • Binary arithmetic operations. • Negative number representations. • Switching Algebra Axioms & Theorems. • Proof of identities: – Using logic expression algebraic manipulation. – Using Truth Table (perfect induction). EEEECCCC334411 -- SShhaaaabbaann #1 Midterm Review Winter 2001 1-22-2002 • Standard Representations of Logic Functions: – Truth Table. – Canonical Sum Representation: • Full sum of minterms expression, or using SS notation. – Canonical Product Representation: • Full product of maxterms expression, or using PP notation. •• CCoommbbiinnaattiioonnaall CCiirrccuuiitt AAnnaallyyssiiss// Synthesis. • Combinational Circuit Minimization using K-maps: – Sum of Products (SOP) Minimization using K-maps: • Prime implicants, distinguished 1-cells, essential prime implicants • Minimization with Don’t care Input Combinations. – Product of Sums (POS) Minimization using K-maps: • Prime implicates, distinguished 0-cells, essential prime implicates • Detecting/Eliminating Static Hazards Using K-maps. EEEECCCC334411 -- SShhaaaabbaann #2 Midterm Review Winter 2001 1-22-2002 Positional Number Systems • A number system consists of an order set of symbols (digits) with relations defined for +,-,*, / • The radix (or base) of the number system is the total number of digits allowed in the the number system. – Example, for the decimal number system: • Radix, r = 10, Digits allowed = 0,1, 2, 3, 4, 5, 6, 7, 8, 9 • In positional number systems, a number is represented by a string of digits, where each digit position has an associated weight. • The value of a number is the weighted sum of the digits. • The general representation of an unsigned number D with whole and fraction portions number in a number system with radix r: D = d d ….. d d .d d …. D r p-1 p-2 1 0 -1 -2 -n • The number above has p digits to the left of the radix point and n fraction digits to the right. • A digit in position i has as associated weight ri • The value of the number is the sum of the digits multiplied by the associated weight ri : D = (cid:229) p- 1 · i d r =- i n i EEEECCCC334411 -- SShhaaaabbaann #3 Midterm Review Winter 2001 1-22-2002 Positional Number Systems Number: D = d d ….. d d .d d …. D r p-1 p-2 1 0 -1 -2 -n (cid:229) - Value: D = p 1 · i d r i=- n i • For example in the decimal number system: 5185.68 = 5x103 + 1x102 + 8x101 + 5x100 + 6 x 10-1 + 8 x 10-2 10 = 5x1000 + 1x100 + 8x10 + 5 x 1 + 6x.1 + 8x.01 • For the binary number system with radix = 2, digits 0, 1 D = d ·· 2p-1 ….. d ·· 21 + d . 20 + d ·· 2-1 + d ·· 2-2 ….. 2 p-1 1 0 -1 -2 • For Example: 10011 = 1 ·· 16 + 0 ·· 8 + 0 ·· 4 + 1 ·· 2 + 1 ·· 1 = 19 2 10 | | MSB LSB (least significant bit) (most significant bit) 101.001 = 1x4 + 0x2 + 1x1 + 0x.5 + 0x.25 + 1x.125 = 5.125 2 10 Binary Point EEEECCCC334411 -- SShhaaaabbaann #4 Midterm Review Winter 2001 1-22-2002 NNuummbbeerr SSyysstteemmss UUsseedd iinn CCoommppuutteerrss Name Radix Set of Digits Example of Radix Decimal r=10 {0,1,2,3,4,5,6,7,8,9} 255 10 Binary r=2 {0,1} 11111111 2 Octal r= 8 {0,1,2,3,4,5,6,7} 377 8 Hexadecimal r=16 {0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F} FF 16 Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 EEEECCCC334411 -- SShhaaaabbaann #5 Midterm Review Winter 2001 1-22-2002 RRaaddiixx--rr ttoo DDeecciimmaall CCoonnvveerrssiioonn • The decimal value of a number in any radix r is found by converting each digit to its radix 10 equivalent and expanding the value using radix arithmetic: D = (cid:229) p- 1 · i d r • Examples: i=- n i 1101.101 = 1··23 + 1··22 + 1··20 + 1··2-1 + 1··2-3 2 = 8 + 4 + 1 + 0.5 + 0.125 = 13.625 10 572.6 = 5··82 + 7··81 + 2··80 + 6··8-1 8 = 320 + 56 + 16 + 0.75 = 392.75 10 2A.8 = 2··161 + 10··160 + 8··16-1 16 = 32 + 10 + 0.5 = 42.5 10 132.3 = 1··42 + 3··41 + 2··40 + 3··4-1 4 = 16 + 12 + 2 + 0.75 = 30.75 10 341.24 = 3··52 + 4··51 + 1··50 + 2··5-1 + 4··5-2 5 = 75 + 20 + 1 + 0.4 + 0.16 = 96.56 10 EEEECCCC334411 -- SShhaaaabbaann #6 Midterm Review Winter 2001 1-22-2002 DDeecciimmaall--ttoo--BBiinnaarryy CCoonnvveerrssiioonn • Separate the decimal number into whole and fraction portions. • To convert the whole number portion to binary, use successive division by 2 until the quotient is 0. The remainders form the answer, with the first remainder as the least significant bit (LSB) and the last as the most significant bit (MSB). • Example: Convert 179 to binary: 10 179 / 2 = 89 remainder 1 (LSB) / 2 = 44 remainder 1 / 2 = 22 remainder 0 / 2 = 11 remainder 0 / 2 = 5 remainder 1 / 2 = 2 remainder 1 / 2 = 1 remainder 0 / 2 = 0 remainder 1 (MSB) 179 = 10110011 10 2 EEEECCCC334411 -- SShhaaaabbaann #7 Midterm Review Winter 2001 1-22-2002 DDeecciimmaall--ttoo--BBiinnaarryy CCoonnvveerrssiioonn • To convert decimal fractions to binary, repeated multiplication by 2 is used, until the fractional product is 0 (or until the desired number of binary places). The whole digits of the multiplication results produce the answer, with the first as the MSB, and the last as the LSB. • Example: Convert 0.3125 to binary 10 Result Digit .3125 ·· 2 = 0.625 0 (MSB) .625 ·· 2 = 1.25 1 .25 ·· 2 = 0.50 0 .5 ·· 2 = 1.0 1 (LSB) 0.3125 = .0101 10 2 EEEECCCC334411 -- SShhaaaabbaann #8 Midterm Review Winter 2001 1-22-2002 DDeecciimmaall ttoo RRaaddiixx--rr CCoonnvveerrssiioonn • Separate the decimal number into whole and fraction portions. • To convert the whole number portion to binary, use successive division by r until the quotient is 0. The remainders form the answer, with the first remainder as the least significant digit (LSD) and the last as the most significant digit (MSD). • To convert decimal fractions to radix-r, repeated multiplication by r is used, until the fractional product is 0 (or until the desired number of binary places). The whole digits of the multiplication results produce the answer, with the first as the MSD, and the last as the LSD. • Example: Convert 467 to octal 10 467 / 8 = 58 remainder 3 (LSD) / 8 = 7 remainder 2 / 8 = 0 remainder 7 (MSD) 467 = 723 10 8 EEEECCCC334411 -- SShhaaaabbaann #9 Midterm Review Winter 2001 1-22-2002 BBiinnaarryy ttoo OOccttaall CCoonnvveerrssiioonn • Separate the whole binary number portion into groups of 3 beginning at the binary point and working to the left. Add leading zeroes as necessary. • Separate the fraction binary number portion into groups of 3 beginning at the binary point and working to the right. Add trailing zeroes as necessary. • Convert each group of 3 to the equivalent octal digit. • Example: 3564.875 = 110 111 101 100.111 10 2 = (6 ·· 83) + (7 ·· 82) + (5 ·· 81)+(4 ·· 80)+(7 ·· 8-1) = 6754.7 8 EEEECCCC334411 -- SShhaaaabbaann #10 Midterm Review Winter 2001 1-22-2002

Description:
Jan 22, 2002 Binary to Octal. – Binary to Hex. • Binary arithmetic operations. • Negative number representations. • Switching Algebra Axioms & Theorems.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.