Test 1 CMSC 2100
Fall 2024
- Please answer each question fully, carefully and thoughtfully.
- No credit will be given for unreadable answers, please write neatly.
- Answer the questions in any order, but please number each answer.
- Make sure that your name is on your test.
- Please show all computations.
- You may use a calculator, but write down intermediate steps
- The purpose of the questions is to demonstrate an algorithm or technique. If you do not show your computations, the answer will be marked incorrect.
- If w, x, y, z are valid digits and b is an integer greater than 1.
- [2 points] What can you say about w, x, y, z with respect to b (in decimal)?
- [2 points] What is the value of wxwzb in decimal?
- Showing your computations, convert:
- [4 points] 43 to binary.
- [4 points] 43 to base 5.
- [4 points] 437 to decimal.
- Convert:
- [2 points] 10110102 to octal and hexadecimal.
- [2 points] AF16 to binary and octal.
- [4 points] Why are representations in octal and hexadecimal preferred over other bases in computing?
- For the next three problems, please do all work in 8 bits.
- [2 points] Represent -83 in sign magnitude.
- [2 points] Represent -83 in two's complement
- [2 points] What does the bit string 10000000 represent in 8 bit two's complement?
- [6 points] Describe the regular format for 32 bit IEEE 754 floating point representation. You need not worry about the size of the fields, just describe each. You are not required to describe the denormal format.
- [6 points] Compare and contrast ASCII and EBCDIC.
- Parity
- [4 points] What is a parity bit and what is it used for?
- [2 points] What needs to be added to the bit pattern 10110 to give it odd parity?
- [2 points] Can a parity bit alone be used to correct errors?