Basic Theories of Computing University of the Cordilleras
Basic Theories of Computing University of the Cordilleras
Radix Conversion Radix and Exponents 1, 234 = 1 x 103 + 2 x 102 + 3 x 101 + 4 x 100 210 + 29 + 28 + 27 + 26 + 23 + 22 + 21 1998 1111100 Radix 2 Radix 10 3023 Radix 10 Radix 16 114602 -036 Radix 8 Radix 10
Numerical Representations Fixed Point Number Representation MSB – Sign Bit 2’s complement -16 1001 1010 1111 1011 1110 1100 1110 0111
Numerical Representations Floating Point Number Representation Normalization IEEE 754 Mantissa Sign MSB; Exponent 8 bits ; Radix Point; Mantissa 23 bits
Operations Addition and Subtraction using Addition Arithmetic and Logical Shift
Character Representation ASCII Unicode Image Representations Sound Representations Sampling Quantization Encoding Coded Digital Display
1. Which of the following is a decimal number expression of the result of adding together the binary numbers 1. 1011 and 1. 1101? a. b. c. d. 3. 1 3. 375 3. 8
2. Which of the following is the correct value of the quadruple of hexadecimal fraction 0. FEDC? a. b. c. d. 1. FDB 8 2. FB 78 3. FB 70 F. EDC 0
3. The decimal value -72 is stored in an 8 -bit register using 2’s compliment. If the data in the register is logically shifted two bits to the right, which of the following is the correct result that is represented in decimal? a. b. c. d. -19 -18 45 46
1. Convert 0. C into decimal. a. b. c. d. 0. 12 0. 55 0. 75 0. 84
5. There is an 8 -bit value. It uses 2’s complement. The value in decimal is -100. If you express this value without a sign, what will it be? a. b. c. d. 28 100 156 228
6. Which of the following decimal fractions become a finite fraction in an octal representation? a. b. c. d. 0. 3 0. 4 0. 5 0. 8
7. Which of the following is the reason why a large number of computers use “complement” representation to simplify arithmetic circuits? a. Addition can be processed by subtraction b. Division can be processed by a combination of subtractions c. Multiplication can be processed by a combination of additions d. Subtraction can be processed by addition
8. In a floating-point number format, which of the following is the correct operation for adjusting the radix point and the exponent so that the most significant digit of the mantissa can be a non-zero value? Here, an absolute value is used for the mantissa. a. b. c. d. Carry Normalize Round Down Round Up
9. Which of the following represents correctly the size relation amongst the following 4 prefix symbols that represent integer exponents of 10: G, k, M and T? a. b. c. d. e. G<k<M<T k<G<T<M k<M<G<T M<G<k<T M<T<G<k
10. Which of these values is the correct result of the subtraction of the hexadecimal numbers DD and 1 F? a. b. c. d. e. AF BE CE EC FC
11. There is a 1 -byte data. In binary, this data has the same numbers of “ 0” and “ 1”. If it does not support sign bit. What value could be the largest? a. b. c. d. 120 127 170 240
12. There is a register. You store positive value of X. You shift twice to the left and add original value of X. What will be the value of the register compared to X? a. b. c. d. x 3 x 4 x 5 x 6
13. In what radix does the following equation hold? 131 – 45 = 53 a. 6 b. 7 c. 8 d. 9
14. Two players, X and Y play a dice game. A pair of dice is tossed. If the sum of the dice is 2, 4, or 6, X wins the game. Otherwise, Y wins. What is the probability that Y wins the game? a. b. c. d. 1/4 1/3 1/2 3/4
15. When you flip a coin four times, what is the probability that it will come up heads exactly twice? a. b. c. d. 0. 2 0. 375 0. 625
- Slides: 22