CELIA SCHAHCZENSKI FE Exam Review Computers Oct. 18, 2018
TOPICS Data Storage (2 problems) Data transmission (1 problem) Pseudo code (2 problems) Spreadsheets (3 problems) Logic Circuits (2 problems) Flowcharts (2 problems) Number systems (5 problems)
DATA STORAGE Copyright Kaplan AEC Education, 2008
DATA STORAGE 1. How many bytes does a 64 KB microprocessor memory contain? (a) 64,000 (b) 65,536 (c) 64,512 (d) 66560
SOLUTION 1 KB is equivalent to 1,024 ( = 2 10 ) bytes. Therefore, 64 KB = 64 * 1024 = 65,536. Answer is (b).
QUANTITIES Kilo thousand (1, 024), 2 10 Mega million (1, 048,576), 2 20 Giga billion, 2 30 Tera trillion, 2 40 Peta quadrillion, 2 50 Exa quintillion, 2 60 Zetta sextillion, 2 70 Yotta septillion, 2 80
DATA STORAGE 2. On modern machines a byte is equivalent to (a) (b) (c) (d) 2 bits 8 bits a word 4 bits
SOLUTION A byte is defined as a group of 8 bits. Answer: (b)
DATA TRANSMISSION Copyright Kaplan AEC Education, 2008
DATA TRANSMISSION 3. When transmitting odd-parity coded symbols, the number of bits that are zeros in each symbol is (a) even (b) odd (c) unknown (d) none of the above
SOLUTION Odd parity coding requires odd number of 1 bits (including the parity bit). The number of zeros is not determined for parity purposes and thus could be either odd or even. So it is unknown. Answer: (c)
PSEUDO CODE Copyright Kaplan AEC Education, 2008
PSEUDO CODE 4. Consider the pseudo code below. power = 3 count = 0 do while (power < 2000) power = power * power count = count + 1 end do What are the values of count and power at the end of execution?
SOLUTION power is <2000 Iteration 1: power = 3 * 3 = 9; count = 0 + 1 = 1 power is <2000 Iteration 2: power = 9 * 9 = 81; count = 1 + 1 = 2 power is <2000 Iteration 3: power = 81 * 81 = 6561; count = 2 + 1 = 3 Power is >2000 Execution stops. Therefore, count = 3 and power = 6561
PROGRAMMING LOOPS 5. If the following Fortran DO loop is executed, the output printed would be DO 1 K = 3, 7, 2 J = K 1 Continue Print J (a) 6 (b) 9 (c) 3 (d) 7
SOLUTION In executing the loop, for the first iteration, K = 3 and so J = 3. In second iteration K = 5 and so J = 5. Next, K = 7, the loop will be executed, and so J = 7. On the next iteration K = 9, so the loop will not be executed; the program will go to the Print statement and print the last value of J, which is 7. Answer: (d)
SPREADSHEETS Copyright Kaplan AEC Education, 2008
SPREADSHEETS 6. A spreadsheet has cell A1 set to 2 and A2 to 3. In cell A3 a formula $A1 + A$2 is placed. This formula is then copied into cells A4, A5 and A6 in order. The number in cell A6 is: (a) 9 (c) 21 (b) 8 (d) 5
SOLUTION Recall that a $ sign in front of column or row variable in a formula makes the reference an absolute reference as the formula is copied to other cells. Cells in the spreadsheet will be:
A (formulas) A (numbers) 1 2 2 2 3 3 3 $A1 + A$2 5 Answer: (a) 4 $A2 + A$2 6 5 $A3 + A$2 8 6 $A4 + A$2 9
SPREADSHEETS 7. A spreadsheet is populated with numbers and formulas as shown. Formula from B5 is copied into cell D5. What is the value in cell D5? A B C D E 1 2 5 6 1 2 5 4 3 5 3 10 7 9 3 4 4 8 1 4 5 Sum(A1:A4) Average(A1:$B4) Sum(A1:B4)??
SOLUTION The formula in cell D5 will be AVERAGE ($B1:C4) leading to average of values in eight cells, B1 through C4, which is (5 + 4 + 7 + 8 + 6 + 3 + 9 + 1) / 8 = 5.375
SPREADSHEETS 8. In the following spreadsheet, formula from cell B5 is copied into cell E5. What is the value in cell E5? A B C D E 1 2 5 6 1 2 5 4 3 5 3 10 7 9 3 4 4 8 1 4 5 Sum(A1:A4) Average(A1:$B4) Sum(A1:B4)??
SOLUTION The formula in cell E5 will be AVERAGE ($B1:D4) leading to average of values in twelve cells, B1 through D4, which is (5 + 4 + 7 + 8 + 6 + 3 + 9 + 1 + 1 + 5 + 3 + 4) / 12 = 4.6666667
LOGIC CIRCUITS Copyright Kaplan AEC Education, 2008
LOGIC CIRCUITS 9. Develop and simplify the Boolean expressions For the given Logic circuit and simplify.
SOLUTION The term logic in digital computing applies to AND, OR, NAND, NOR or XOR logic functions. Logic gates produce a high or low at the output which is dependent on the conditions of the inputs. Copyright Kaplan AEC Education, 2008
SOLUTION AND NOT OR XOR Copyright Kaplan AEC Education, 2008
SOLUTION 1. Inputs A and B feed AND gate 1, so its output is A.B 2. Inputs and A feed OR gate 2, so its output is + A 3. Output gates 1 and 2 feed OR gate 3, so its output is A.B + ( +A)
LOGIC CIRCUITS 10. Find the Boolean function of the logic circuit and simplify.
SOLUTION 1. Inputs A and C feed OR gate 1, so its output is A+C 2. The result of step 1, along with B, feeds into AND gate 2, so its output is (A+C).B 3. The result of step 2, along with B, feeds into OR gate 3, so its output is (A+C).B + B 4. This simplifies to B, but that isn t one of the answers. 5. Find one of the answers which is equivalent. 6. Factoring out the B gives ((A+C) + 1). B which is equivalent to (A+C + 1). B which can also be written B.(A+C + 1)
FLOWCHARTS Copyright Kaplan AEC Education, 2008
FLOWCHARTS 11.In a flowchart a graphical symbol for a process is (a) (b) (c) (d)
SOLUTION Diamond - decision or branching Circle connector Rectangle process Parallelogram - input-output (I-O) Answer: (c)
SAMPLE FLOWCHART
SAMPLE FLOWCHART WITH CONNECTOR
SAMPLE FLOWCHART
FLOWCHARTS 12.The following symbol used in a flowchart indicates (a) Branching (b) Process (c) Input-Output (d) Start-Stop
SOLUTION Ellipse - start or termination of an operation Answer: (d)
NUMBER SYSTEMS
NUMBER SYSTEMS 13. A decimal number 458 is equivalent to an octal number: (a) (217) 8 (b) (458) 8 (c) (712) 8 (d) (4510) 8
SOLUTION Quotient Remainder 458 8= 57 + 2 57 8= 7 + 1 7 8= 0 + 7 Answer: (c)
NUMBER SYSTEMS 14. Hexadecimal representation of the binary number 1011011 01111 is (a) 5B 78 (b) B6 78 (c) B6 0F (d) 5B 0F
SOLUTION Group the binary bits into groups of four, starting from the binary point ( ) and moving (left) and padding with trailing (leading) 0's as necessary. Then convert each group of four to a hexadecimal digit. 101 1011 0111 1000 = 5 B 7 8 Answer: (a)
NUMBER SYSTEMS 15. Binary equivalent of ECE C0E is (a) 11101100111 110000000111 (b) 111011001110 11000111 (c) 1110110111.110111 (d) 111011001110 11000000111
SOLUTION Replace each hexadecimal digit with its 4-bit equivalent binary number; and retain the position of the hexadecimal point. Remove leading and trailing zeros. E C E C 0 E 1110 1100 1110 1100 0000 1110 Answer: (d)
NUMBER SYSTEMS 16. Decimal equivalent of the octal number (157) 8 is (a) 157 (b) 111 (c) 227 (d) 96
SOLUTION 1 x 8 2 + 5 x 8 1 + 7 x 8 0 = 111 Answer: (b)
NUMBER SYSTEMS 17. Hexadecimal representation of an octal number (155) 8 is (a) DA (b) 6D (c) 109 (d) 77 5
SOLUTION Represent the octal number in binary form and then group binary bits in groups of 4 starting from the binary point and going left (right) and adding leading (trailing) 0s as necessary. (155) 8 = 1 101 101 = 0110 1101 = 6 D Answer: (b)
GOOD LUCK!