07_binarynums

# 07_binarynums - Number Systems Readings 5-5.3.3 5.3.5...

This preview shows pages 1–6. Sign up to view the full content.

134 Number Systems Readings: 5-5.3.3, 5.3.5 Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs Display: Seven segment displays Inputs: Switches Missing: Way to implement numbers in binary Approach: From decimal to binary numbers (and back) 135 Decimal (Base 10) Numbers Positional system - each digit position has a value 2534 = 2*1,000 + 5*100 + 3*10 + 4*1 Alternate view: Digit position I from the right = Digit * 10 I (rightmost is position 0) 2534 = 2*10 3 + 5*10 2 + 3*10 1 + 4*10 0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
136 Base R Numbers Each digit in range 0. .(R-1) 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F . .. A = 10 B = 11 C = 12 D = 13 E = 14 F = 15 Digit position I = Digit * R I D 3 D 2 D 1 D 0 (base R) = D 3 *R 3 +D 2 *R 2 +D 1 *R 1 +D 0 *R 0 137 Number System (Conversion to Decimal) Binary: (101110) 2 = Octal: (325) 8 = Hexadecimal: (E32) 16 =
138 Conversion from Base R to Decimal Binary: (110101) 2 Octal: (524) 8 Hexadecimal: (A6) 16 139 Conversion of Decimal to Binary (Method 1) For positive, unsigned numbers Successively subtract the greatest power of two less than the number from the value. Put a 1 in the corresponding digit position 2 0 =1 2 4 =16 2 8 =256 2 12 =4096 (4K) 2 1 =2 2 5 =32 2 9 =512 2 13 =8192 (8K) 2 2 =4 2 6 =64 2 10 =1024 (1K) 2 3 =8 2 7 =128 2 11 =2048 (2K)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
140 Decimal to Binary Method 1 Convert (2578) 10 to binary Convert (289) 10 to binary 141 Conversion of Decimal to Binary (Method 2) For positive, unsigned numbers Repeatedly divide number by 2. Remainder becomes the binary digits (right to left) Explanation:
142 Decimal to Binary Method 2 Convert (289) 10 to binary 143 Decimal to Binary Method 2 Convert (85) 10 to binary

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 19

07_binarynums - Number Systems Readings 5-5.3.3 5.3.5...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online