{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW1_solution

# HW1_solution - ECE 2504 Introduction to Computer...

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

1 ECE 2504 Introduction to Computer Engineering, Fall 2008 Homework 1 Due date: 9/1/08, 11:59 pm Show all work 1. (3 pts) Convert the following binary numbers to decimal: 110101; 11011010; 1011001101. a. 110101 = 1×2 5 + 1×2 4 + 0×2 3 + 1×2 2 + 0×2 1 + 1×2 0 = 32 + 16 + 0 + 4 + 0 + 1 = 53 b. 11011010 = 1×2 7 + 1×2 6 + 0×2 5 + 1×2 4 + 1×2 3 + 0×2 2 + 1×2 1 + 0×2 0 = 128 + 64 + 0 + 16 + 8 + 0 + 2 + 0 = 218 c. 1011001101 = 1×2 9 + 0×2 8 + 1×2 7 + 1×2 6 + 0×2 5 + 0×2 4 + 1×2 3 + 1×2 2 + 0×2 1 + 1×2 0 = 512 + 0 + 128 + 64 + 0 + 0 + 8 + 4 + 0 + 1 = 717 2. (4 pts) Convert the following numbers with the indicated bases to decimal: (11221) 3 ; (24314) 5 ; (432) 7 ; (1876) 9 . a. (11221) 3 = 1×3 4 + 1×3 3 + 2×3 2 + 2×3 1 + 1×3 0 = 81 + 27 + 18 + 6 + 1 = 133 c. (432) 7 = 4×7 2 + 3×7 1 + 2×7 0 = 196 + 21 + 2 = 219 b. (24314) 5 = 2×5 4 + 4×5 3 + 3×5 2 + 1×5 1 + 4×5 0 = 1250 + 500 + 75 + 5 + 4 = 1834 d. (1876) 9 = 1×9 3 + 8×9 2 + 7×9 1 + 6×9 0 = 729 + 648 + 63 + 6 = 1446

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

View Full Document
2 3. (3 pts) Convert the following decimal numbers to binary: 487; 2018; 34265. a. 487 0 1 001 2 1 003 2 1 007 2 1 015 2 0 030 2 0 060 2 1 121 2 1 243 2 1 487 2 111100111 Check: = 1×2 8 + 1×2 7 + 1×2 6 + 1×2 5 + 0×2 4 + 0×2 3 + 1×2 2 + 1×2 1 + 1×2 0 = 256 + 128 + 64 + 32 + 0 + 0 + 4 + 2 + 1 = 487 b. 2018 1 0001 2 1 0003 2 1 0007 2 1 0015 2 1 0031 2 1 0063 2 0 0126 2 0 0252 2 0 0504 2 1 1009 2 0 2018 2 11111100010 Check: = 1×2 10 + 1×2 9 + 1×2 8 + 1×2 7 + 1×2 6 + 1×2 5 + 0×2 4 + 0×2 3 + 0×2 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}