Exercises 1.1-1.30
View all answers: Harris Solutions
Exercise 1.1 Three level of abstraction
a) Biological abstraction at the cell level:
Solution:
Biologists study cells at many levels. The cells are built from organelles such as the mitochondria, ribosomes, and chloroplasts. Organelles are built of macromolecules such as proteins, lipids, nucleic acids, and carbohydrates. These biochemical macromolecules are built simpler molecules such as carbon chains and amino acids. When studying at one of these levels of abstraction, biologists are usually interested in the levels above and below: what the structures at that level are used to build, and how the structures themselves are built.
b) Abstractions of chemistry about material:
Solution:
The fundamental building blocks of chemistry are electrons, protons, and neutrons (physicists are interested in how the protons and neutrons are built). These blocks combine to form atoms. Atoms combine to form molecules. For example, when chemists study molecules, they can abstract away the lower levels of detail so that they can describe the general properties of a molecule such as benzene without having to calculate the motion of the individual electrons in the molecule.
Exercise 1.2 Using Hierarchy, Modularity, Regularity
a) By automobile designers
Solution:
Automobile designers use hierarchy to construct a car from major assemblies such as the engine, body, and suspension. The assemblies are constructed from subassemblies; for example, the engine contains cylinders, fuel injectors, the ignition system, and the drive shaft. Modularity allows components to be swapped without redesigning the rest of the car; for example, the seats can be cloth, leather, or leather with a built in heater depending on the model of the vehicle, so long as they all mount to the body in the same place. Regularity involves the use of interchangeable parts and the sharing of parts between different vehicles; a 65R14 tire can be used on many different cars.
b) By businessman in daily deals
Solution:
Businesses use hierarchy in their organization chart. An employee reports to a manager, who reports to a general manager who reports to a vice president who reports to the president. Modularity includes well-defined interfaces between divisions. The salesperson who spills a coke in his laptop calls a single number for technical support and does not need to know the detailed organization of the information systems department. Regularity includes the use of standard procedures. Accountants follow a well-defined set of rules to calculate profit and loss so that the finances of each division can be combined to determine the finances of the company and so that the finances of the company can be reported to investors who can make a straightforward comparison with other companies.
Exercise 1.3 Ben Bitdiddle is building a house. Save him money and time with three y's principals
Solution:
Hierarchy:
- Design: how many bedrooms, bathrooms, kitchens and other rooms he would like.
- Jump level up: house layout and dimensions of the house.
- Top level hierarchy - material he would like to use, what kind of roof etc.
- Jump level down: layout of each room with doors, windows etc.
Regularity:
- framing of the house
- scale framing to each room
- choose doors and windows (sizes, material)
Modularity:
- the dimensions of the windows are the same
And he could save by buying some items (like windows) in bulk.
Exercise 1.4 Voltage: in 0-5V range. Measure accuracy: ±50mV. How many bits it convey?
Solution:
±50mV is 100mV intervals. 50 intervals. log250=5.65 bits
5.65 bits - is the amount of information. Don't be confused with how many bits of a binary number is necessary to include this value.
Exercise 1.5 Old clock without a minute hand
a) You can read the hour each 15 minutes. How many bits you can convey?
b) If include am and pm, how many bits added?
Solution:
a) 60min/15min=4 12hours*4=48 log240=5.58 bits
b) 1 bit
Two discrete values - are 1 bit. See Bit
Exercise 1.6 4000 years ago Babylonian developed sexagesimal numbers (base 60)
a) How many bits they conveyed with one digit?
b) 400010 in sexagesimal?
Solution:
a) log260 = ~6
b) 1 6 4060
Exercise 1.7 How many different numbers can be represent with 16 bits?
Solution:
216 = 65536
Exercise 1.8 What is the largest unsigned 32-bit binary number?
Solution:
2232-1 = 4 294 967 295
Exercise 1.9 What is the largest 16-bit binary number that can be represented with
a) unsigned numbers?
b) two's complement numbers?
c) sign/magnitude numbers?
Solution:
a) 216-1 = 65535
b) 215-1 = 32767
c) 215-1 = 32767
Exercise 1.10 What is the largest 32-bit binary number that can be represented with
a) unsigned numbers?
b) two's complement numbers?
c) sign/magnitude numbers?
Solution:
a) 232-1 = 4 294 967 295
b) 231-1 = 2 147 483 647
c) 231-1 = 2 147 483 647
Exercise 1.11 What is the smallest (most negative) 16-bit binary number that can be represented with
a) unsigned numbers?
b) two's complement numbers?
c) sign/magnitude numbers?
Solution:
a) 0
b) -215 = -32768
c) -(215-1) = -32767
Exercise 1.12 What is the smallest (most negative) 32-bit binary number that can represented with
a) unsigned numbers?
b) two's complement numbers?
c) sign/magnitude numbers?
Solution:
a) 0
b) -231 = -2 147 483 648
c) -(231-1) = -2 147 483 647
Exercise 1.13 Convert unsigned numbers to decimal. Show your work
a) 10102
b) 1101102
c) 111100002
d) 00011000101001112
Solution:
a) 10102 = 1x23 + 0x22 + 1x21 + 0x20 = 8 + 0 + 2 + 0 = 1010
b) 1101102 = 1x25 + 1x24 + 0x23 + 1x22 + 1x21 + 0x20 = 32 + 16 + 0 + 4 + 2 + 0 = 5410
c) 111100002 = 1x27 + 1x26 + 1x25 + 1x24 + 0x23 + 0x22 + 0x21 + 0x20 = 128 + 64 + 32 + 16 + 0 + 0 + 0 + 0= 24010
d) 00011000101001112 = 0 + 0 + 0 + 1x212 + 1x211 + 0x210 + 0x29 + 0x28 + 1x27 + 0x26 + 1x25 0x24 + 0x23 + 1x22 + 1x21 + 1x20 = 4096 + 2048 + 128 + 32 + 4 + 2 + 1 = 631110
Exercise 1.14 Convert the following unsigned binary numbers to decimal. Show your work
a) 11102
b) 1001002
c) 110101112
d) 0111010101001002
Solution:
a) 11102 = 1x23 + 1x22 + 1x21 + 0x20 = 8 + 4 + 2 + 0 = 1410
b) 1001002 = 1x25 + 0x24 + 0x23 + 1x22 + 0x21 + 0x20 = 32 + 0 + 0 + 4 + 0 + 0 = 3610
c) 110101112 =1x27 + 1x26 + 0x25 + 1x24 + 0x23 + 1x22 + 1x21 + 1x20 = 128 + 64 + 0 + 16 + 0 + 4 + 2 + 1 = 21510
d) 0111010101001002 = 1x213 + 1x212 + 1x211 0x210 1x29 + 0x28 + 1x27 + 0x26 + 1x25 + 0x24 + 0x23 + 1x22 + 0x21 + 0x21 = 8192 + 4096 + 2048 + 0 + 512 + 0 + 128 + 32 + 4 = 1501210
Exercise 1.15 Repeat Exercise 1.13, but convert in hexadecimal
a) 10102
b) 1101102
c) 111100002
d) 00011000101001112
Solution:
a) 10102 = A16
b) 11 01102 = 3616
c) 1111 00002 = F016
d) 0001 1000 1010 01112 = 18A716
Break a binary number into groups of 4 digits and convert each group separately. After that, just concatenate all the resulting hexadecimal digits.
Exercise 1.16 Repeat exercise 1.14, but convert to hexadecimal
a) 11102
b) 1001002
c) 110101112
d) 0111010101001002
Solution:
a) 11102 = E16
b) 10 01002 = 2416
c) 1101 01112 = D716
d) 011 1010 1010 01002 = 3AA416
Exercise 1.17 Convert the following hexadecimal numbers to decimal. Show your work
a) A516
b) 3B16
c) FFFF16
d) D000000016
Solution:
a) A516 = 10x161 + 5x160 = 160 + 5 = 16510
b) 3B16 = 3x161 + 11x160 = 48 + 11 = 5910
c) FFFF16 = 15x163 + 15x162 + 15x161 + 15x160 = 61440 + 3840 + 240 + 15 = 6553510 (216-1)
d) D000 000016 = 13x167 = 3 489 660 92810
Exercise 1.18 Convert the following hexadecimal numbers to decimal. Show your work
a) 4E16
b) 7C16
c) ED3A16
d) 403FB00116
Solution:
a) 4E16 = 4x161 + 14x160 = 64 + 14 = 7810
b) 7C16 = 7x161 + 12x160 = 112 + 12 = 12410
c) ED3A16 = 14x163 + 13x162 + 3x161 + 10x160 = 57344 + 3328 + 48 + 10 = 6073010
d) 403FB00116 = 4x167 + 0x166 + 3x165 + 15x164 + 11x163 + 0x162 + 0x161 + 1x160 = 1 073 741 824 + 0 + 3 145 728 + 983 040 + 45056 + 0 + 0 + 1 = 1 077 915 64910
Exercise 1.19 Repeat exercise 1.17, but convert to unsigned binary
a) A516
b) 3B16
c) FFFF16
d) D000000016
Solution:
a) A516 = 1010 01012
b) 3B16 = 0011 10112
c) FFFF16 = 1111 1111 1111 11112
d) D000000016 = 1101 0000 0000 0000 0000 0000 0000 00002
Exercise 1.20 Repeat exercise 1.18, but convert to unsigned binary
a) 4E16
b) 7C16
c) ED3A16
d) 403FB00116
Solution:
a) 4E16 = 100 11102
b) 7C16 = 111 11002
c) ED3A16 = 1110 1101 0011 10102
d) 403FB00116 = 100 0000 0011 1111 1011 0000 0000 00012
Exercise 1.21 Convert the following two's complement binary numbers to decimal
a) 10102
b) 1101102
c) 011100002
d) 100111112
Solution:
a) 10102 = -8 +2 = -610
This is another way to convert negative two's complement binary numbers to decimal numbers. The most significant bit is taken with a minus sign, and the remaining bits are taken with a plus sign:
1010 <- binary digits
8421 <- position weight
====
-1x8 + 0x4 + 1x2 + 0x0
-8 + 2 = -6
or you can find the magnitude (modulus) of a negative number by taking the two's complement:
1010
0101 <- invert
+ 1
====
0110 = 6 (thus, -6)
b) 1101102 = -32+16+4+2=-1010 or
110110
001001
+ 1
======
001010 = 10 (thus, -10)
c) 011100002 = 64 + 32 + 16 = 11210
d) 100111112 = -128+16+8+4+2+1=-9710 or
10011111
01100000
+ 1
========
01100001 = 97 (thus, -97)
Exercise 1.22 Convert the following two's complement binary numbers to decimal
a) 11102
b) 1000112
c) 010011102
d) 101101012
Solution:
a) 11102 = -8+4+2 = -210 or
1110
0001
+ 1
====
0010 = 2 (thus, -2)
b) 1000112 = -32+2+1 = -2910 or
100011
011100
+ 1
======
011101 = 29 (thus, -29)
c) 010011102 = 64+8+4+2 = 7810
d) 101101012 = -128+32+16+4+1 = -7510 or
10110101
01001010
+ 1
========
01001011 = 75 (thus, -75)
Exercise 1.23 Repeat exercise 1.21, assuming the binary numbers are in sigh/magnitude form rather than two's complement representation
a) 10102
b) 1101102
c) 011100002
d) 100111112
Solution:
a) 10102 = -210
b) 1101102 = -2210
c) 011100002 = 11210
d) 100111112 = -3110
Exercise 1.24 Repeat exercise 1.22, assuming the binary numbers are in sign/magnitude form rather than two's complement representation
a) 11102
b) 1000112
c) 010011102
d) 101101012
Solution:
a) 11102 = -610
b) 1000112 = -310
c) 010011102 = 7810
d) 101101012 = -5310
Exercise 1.25 Convert the following decimal numbers to unsigned binary numbers
a) 4210
b) 6310
c) 22910
d) 84510
Solution:
a) 4210 = 1x32(25) + 0x16(24) + 1x8(23) + 0x4(22) + 1x2(21) + 0x1(20) = 1010102
b) 6310 = 1x32(25) + 1x16(24) + 1x8(23) + 1x4(22) + 1x2(21) + 1x1(20) = 1111112
c) 22910 = 1x128(27) + 1x64(26) + 1x32(25) + 0x16(24) + 0x8(23) + 1x4(22) + 0x2(21) + 1x1(20) = 1110 01012
d) 84510 = 1x512(29) + 1x256(28) + 0x128(27) + 1x64(26) + 0x32(25) + 0x16(24) + 1x8(23) + 1x4(22) + 0x2(21) + 1x1(20) = 11 0100 11012
Exercise 1.26 Convert the following decimal numbers to unsigned binary numbers
a) 1410
b) 5210
c) 33910
d) 71110
Solution:
a) 1410 = 1x8(23) + 1x4(22) + 1x2(21) + 0x1(20) = 11102
b) 5210 = 1x32(25) + 1x16(24) + 0x8(23) + 1x4(22) + 0x2(21) + 0x1(20) = 1101002
c) 33910 = 1x256(28) + 0x128(27) + 1x64(26) + 0x32(25) + 1x16(24) + 0x8(23) + 0x4(22) + 1x2(21) + 1x1(20) = 1 0101 00112
d) 71110 = 1x512(29) + 0x256(28) + 1x128(27) + 1x64(26) + 0x32(25) + 0x16(24) + 0x8(23) + 1x4(22) + 1x2(21) + 1x1(20) = 10 1100 01112
Exercise 1.27 Repeat exercise 1.25, but convert to hexadecimal
a) 4210
b) 6310
c) 22910
d) 84510
Solution:
a) 4210 = 2x16(161) + 10x16(160) = 2A16
b) 6310 = 3x16(161) + 15x16(160) = 3F16
c) 22910 = 14x16(161) + 5x16(160) = E516
d) 84510 = 3x16(162) + 4x16(161) + 13x16(160) = 34D16
Exercise 1.28 Repeat exercise 1.26, but convert to hexadecimal
a) 1410
b) 5210
c) 33910
d) 71110
Solution:
You can take the binary results from exercise 1.26 and convert them to hexadecimal more easily
a) 1410 = 14x16(160) = E16
b) 5210 = 3x16(161) + 4x16(160) = 3416
c) 33910 = 1x16(162) + 5x16(161) + 3x16(160) = 15316
d) 71110 = 2x16(162) + 12x16(161) + 7x16(160) = 2C716
Exercise 1.29 Convert the following decimal numbers to 8-bit two's complement numbers or indicate that the decimal number would overflow the range
a) 4210
b) −6310
c) 12410
d) −12810
e) 13310
Solution:
a) 4210 = 1x32(25) + 0x16(24) + 1x8(23) + 0x4(22) + 1x2(21) + 0x1(20) = 0010 10102
b) −6310 = 1x32(25) + 1x16(24) + 1x8(23) + 1x4(22) + 1x2(21) + 1x1(20) = 00111111 = 11000000 + 1 = 1100 00012
c) 12410 = 1x64(26) + 1x32(25) + 1x16(24) + 1x8(23) + 1x4(22) + 0x2(21) + 0x1(20) = 0111 11002
d) −12810 = 1000 00002
e) 13310 = overflow
Exercise 1.30 Convert the following decimal numbers to 8-bit two's complement numbers or indicate that the decimal number would overflow the range
a) 2410
b) −5910
c) 12810
d) −15010
e) 12710
Solution:
a) 2410 = 0001 10002
b) −5910 = 0011 1011 = 1100 01012
c) 12810 = overflow
d) −15010 = overflow
e) 12710 = 0111 11112