7.1.2 Number Representation

Chapter 7.1.2 Number Representation

Physics Lecture Notes – Phys 395 Electronics Book
Pages 176
Views 3,709
Downloads : 13 times
PDF Size : 906.7 KiB

Summary of Contents

Physics Lecture Notes – Phys 395 Electronics Book

  • CHAPTER 7. DIGITAL CIRCUITS133Example: Convert the octal number1758 to hexadecimal.1758 =0011111012(7.8)=07D(HEX).(7.9)Example: Convert the number 146 to binary by repeated subtraction of thelargest power of 2 contained in the remaining number.14610 =128 + 16 + 2(7.10)=27 +24 +21(7.11)=100100102.(7.12)Example: Devise a method similar to that used in the previous problem andconvert 785 to hexadecimal by subtracting powers of 16.78510 =3× 162 + 16 + 1(7.13)=311(HEX).(7.14)7.1.2Number RepresentationWe define the followingword: a binary number consisting of an arbitrary number of bits.nibble: a 4-bit word (one hexadecimal digit).byte: an 8-bit word.We often use the expressions 16-bit word (short word) or 32-bit word (long word) dependingon the type of computer being used. Most fast computers today actually employ a 64-bitword at the hardware level.If a word has n bits it can represent 2n different numbers in the range 0 to 2n−1. Negativenumbers are usually represented by the so called 2’s complement notation. To obtain the2’s compliment of a number first take the complement (invert each bit) and then add 1. Allthe negative numbers will have a 1 in the MSB position, and the numbers will now rangefrom−2n−1 to 2n−1 − 1. The electronic advantages of the 2’s complement notation becomesevident when addition is performed. Convince yourself of this advantage.