2015S001/User talk:Carterjseay/Homework 2
From CDS 130
1. Powers of Two
1.1. Find the result of the following and provide the answer in power of two
2^{15} x 2^{-3} x 2^{-5}
all in the power 15-8=7
=2^7
1.2. Find the result of the following and provide the answer in power of two
( 2^{18} x 2^{12} ) / ( 2^{13} x 2^{7} )
18+12=30 13+7=20 30-20=10 =2^10
2. Converting numbers between different bases
2.1. Convert (53)_{7} to octal (base 8) notation
5x7+3x1=38 base 10
4x8+6x1=38 base 10
46 base 8
2.2. Convert (BE)_{16} to binary
10*16+14*1=(174) base 10
(10101110) base2
3. The template method
3.1. Using the template method, convert 101101_{2} to its decimal equivalent
1 | 0 | 1 | 1 | 0 | 1 |
2^{5} | 2^{4} | 2^{3} | 2^{2} | 2^{1} | 2^{0} |
? | ? | ? | ? | ? | ? |
32+0+8+4+0+1=45
3.2. Using the template method, convert 143_{10} to its binary equivalent
(143)10 ⇒⇒ (10001111)2
3.3. Using the extended template method, convert 205.875_{10} to its binary equivalent
(205.875)10 ⇒⇒ (110011010.111)2
Almost. You have an extra 0 before the decimal point that should not be there. The correct ans is 1100 1101.111(-.5 pt)
4. Binary representation of numbers
4.1. What is the binary (base 2) number 100111111, written in decimal (base 10)?
(100111111)base2 ⇒⇒ (319) base10
4.2. What is the largest positive base 10 integer that can be represented with 15 bits?
1,000,000,000,000,000
Good try. However to find the largest positive number, use the formula 2^{N} -1. Where N= the number of bits. So you will get 2^{15} -1. Which is 32767 (base 10) (-1 pt)
4.3. How many different patterns of 1 and 0 can be produced using 7 bits?
128
4.4. How many bits are needed to represent the base-10 number 1021 ?
512+256+128+64+32+16+8+4+0+1
1111111101
10 bits
4.5. How many bit patterns can be formed by 5 bits?
32
4.6. convert (168)_{10} to its binary equivalent
(10101000) base 2
5. INTEGER MULTIPLICATION AND DIVISION OF BINARY NUMBERS BY POWERS OF TWO
5.1. Multiply 101011_{2} by 8_{10} and represent the result in binary
101011000
5.2. Divide 1110010_{2} by 32_{10} and represent the result in binary
11
with Reminder=10010
6. Binary Addition
6.1. Add (100101.110101)_{2} and (11.1101)_{2} . Express your result in binary
(101001.101001)_{2}
6.2. Add (1.625)_{10} and (0.5625)_{10} . Express your result in binary
(10.0011)_{2}
7. Binary Multiplication
7.1. Multiply the binary numbers 0110111 and 1111
(1100111001)_{2}
7.2. Calculate (1010101)_{2} multiplied by (1024)_{10} (without using a calculator), and represent the result in integer binary.
10101010000000000
8. Use your creativity to generate 4 problems of your own and provide answers to them, to demonstrate your understanding of binary number conversion and binary number arithmetic.
8.1. Q1
Convert (AB) base 16 into a base 10
(AB)base16 ⇒⇒ (171)base10
8.2. Q2
Convert (112) base 10 into a binary number.
1110000
8.3. Q3
Multiply 1011011 x 100 = 101101100
8.4. Q4
Add 1011 + 1101 = 11000