Reference no: EM13844069
Data Representation: Numbers
1. Think about the examples we discussed in class - how numbers can be represented in 4 bits or 8 bits, etc. Expand this thinking to 16 bits. If you were given 16 bits to work with, as the basis for your representation scheme:
a. Assuming that all 16 bits are used only to represent digits (no excess bit), what would be the lowest integer you could represent? What would be the highest?
b. Assuming that the leftmost bit is reserved as an excess bit and the remaining 15 bits represent digits of the number, what would be the lowest integer you could represent? What would be the highest?
c. How many unique numbers can be represented?
2. You were recently hired to operate the MSU scoreboard for a variety of sporting events hosted on campus. Unfortunately, the MSU scoreboard requires that the operator enter in the appropriate score using a series of binary switches where a switch in the UP position denotes a '0' and a switch in the DOWN position denotes a '1' (ex. UP-DOWN-DOWN-UP would be 0110).
a. For MSU football events, the scores are always positive integers that never exceed 160 points. Assuming that all of the switches will be used only to represent digits (no excess bit), what is the minimum number of switches needed to represent any score within this range? What is the lowest score you could represent with this number of switches? What is the highest score you could represent with this number of switches? Describe how you would represent the score '92' using UP/DOWN notation.
b. For MSU disc golf events, each score represents the number of strokes the player is above or below a certain threshold (par). Disc golf scores can be either positive or negative integers that never exceed +/- 27. Assuming that the leftmost switch is reserved as an excess bit and all of the remaining switches represent digits, what is the minimum number of switches needed to represent any disc golf score within this range? What is the lowest score you could represent with this number of switches? What is the highest score you could represent with this number of switches? Describe how you would represent a score of '-35' using UP/DOWN notation.
c. How many unique scores can be generated if you are required to use 11 switches?
3. Evaluate the following string of binary digits 11100010 as:
a. An unsigned integer (assuming all bits are used to represent numerical information)
b. A signed integer (assuming that the leftmost bit is an excess bit, with 1 denoting a negative sign)
c. A real number, assuming that the leftmost bit is an excess bit, with 1 denoting a negative sign) , the next four are the whole part of the number, and the last three the fractional part of the number
4. To be promoted to the level of Lead supervisor/scorekeeper on campus, you must demonstrate that you can easily and effortlessly convert a configuration of binary switches into their corresponding decimal value. As a reminder, a switch in the DOWN position represents a '1' and a switch in the UP position represents a '0'.
a. What does the configuration DOWN-UP-UP-DOWN-UP-DOWN-UP-DOWN-UP-UP represent where the leftmost switch (excess bit) UP DOWN denotes that the score is negative? (DOWN=1 per intro description)
b. What does the configuration DOWN-UP-UP-UP-DOWN-UP-DOWN-UP-DOWN-UP represent where all switches are used to represent numerical information?
c. What does the configuration DOWN-UP-DOWN-UP-DOWN-DOWN-UP-DOWN-UPDOWN-UP-UP represent where the leftmost switch is an excess bit, the next 5 switches represent the whole part of the number, and the remaining switches represent the fractional part of the number?
5. Convert the following numbers from decimal to binary (show your work). Use the following convention when giving the final binary equivalent: excess bit should be the leftmost bit (use 1 to denote the negative sign), followed by 7 bits for the whole part of the number, followed by 4 bits to represent the fractional part of the number:
a. -45.5625
b. 36.875
c. 100.2
d. -127.25
6. You have been asked to perform scorekeeping for the swimming and diving program here at MSU starting in the Spring semester. Although the scorekeeping system has been upgraded to support fractional parts of an athlete's time, you must demonstrate your proficiency in converting the following decimal numbers to the appropriate configuration of binary switches. As a reminder, a switch in the DOWN position represents a '1' and a switch in the UP position represents a '0'.
a. Convert -28.375 to the appropriate ON/OFF configuration where the leftmost switch is the excess bit, followed by 5 switches for the whole part of the number, followed by 4 switches to represent the fractional part of the number.
b. Convert 46.78125 to the appropriate ON/OFF configuration where the leftmost switch is the excess bit, followed by 6 switches for the whole part of the number, followed by 5 switches to represent the fractional part of the number.
c. Convert -13.46875 to the appropriate ON/OFF configuration where the 4 leftmost switches represent the whole part of the number, followed by 1 switch for the excess bit, followed by 5 switches to represent the fractional part of the number.
d. Convert -58.65625 to the appropriate ON/OFF configuration where the 6 leftmost switches represent the whole part of the number, followed by 1 switch for the excess bit, followed by 5 switches to represent the fractional part of the number.
7. The Library of Congress has a collection of ~ 29 million books. Assume it takes about 2048 bytes to store a single page of text from a book and a typical book is 200 pages long. How much storage is required to store all the books in the Library of Congress? (use the metric system for calculation; based on "Blown to Bits").
8. The Michigan State University electronic mail (email) system supports 50,138 undergraduate and graduate students. Assume that each student tends to store approximately 250 emails in their inbox and another 155 emails in their outgoing mailbox. Given that the average size of a single email is 35 kilobytes, how much storage does the MSU email system require to store student emails? Use the metric system for calculation and report your answer in gigabytes (GB).
Excel Exercises
9. In the homework folder, you will find an Excel spreadsheet called day03hw_units.xlsx that shows the number of bits represented by a metric prefix (e.g. gigabits, petabits, etc). There are 3 mistakes in this spreadsheet: find them and fix them. Even after fixing the mistakes, this sheet will not show correct results. Why and at what prefix level does Excel start making mistakes when calculating the actual number of bits despite correct formulas? (use a calculator to compare)
10. In this exercise you will create an Excel calculator that takes in decimal digits and calculates the resulting number. Start by creating a copy of day03tables.xlsx you used in class and call the new file day03hwtables_decimal.xlsx. Make the following changes in the decimal sheet of this file:
a. Replace column headings indicating the column value with formulas, e.g. 10^3 with =10^3
b. Below the headings, delete all table rows except for a single row for entering in decimal digits (delete spreadsheet rows 4 and below)
c. In the rightmost results column, enter a formula that calculates the equivalent decimal number based on the digits entered by the user into each column.
Now, regardless of the digits entered in the first row of your table, your final column will automatically calculate the overall number, e.g. if 1-0-8-4 is entered into the table's columns, the results column should show/calculate 1084; if 7-3-1-5 is entered, the results column will show/calculate 7315.
11. In this exercise you will create an Excel calculator that takes in binary digits and calculates the resulting decimal number. Start by creating a copy of day03tables.xlsx you used in class and call the new file day03hwtables_binary.xlsx. Make the following changes in the binary sheet of this file:
d. Replace column headings indicating the column value with formulas, e.g. 2^3 with =2^3
e. Below the headings, delete all table rows except for a single row for entering in binary digits (delete spreadsheet rows 4 and below)
f. In the rightmost results column, enter a formula that calculates the equivalent decimal number based on the binary digits entered by the user into each column. (hint: N x 1 = N, N x 0 = 0)
Now, regardless of the digits entered in the first row of your table, your final column will automatically calculate the overall number, e.g. if 1-0-1-1 is entered into the table's columns, the results column should show/calculate 11; if 0-1-0-0 is entered, the results column will show/calculate 4
12. In this exercise you will create an Excel file called day03hw_binaryInts.xlsx that calculates the highest and lowest signed and unsigned integers that can be implemented given a specific number of bits. Overall, your spreadsheet should have the following columns:
g. Number of Bits (2 to 24)
h. Lowest unsigned integer (conveyed by that number of bits - you may manually enter the values into this column)
i. The highest unsigned integer (conveyed by that number of bits - use a formula)
j. The lowest signed integer (conveyed by that number of bits - use a formula)
k. The highest signed integer (conveyed by that number of bits - use a formula)
l. Units of Information (conveyed by that number of bits - use a formula)