MID TERM SAMPLE QUESTIONS (ANSWERS)
History of Computers
====================
1) At the lowest levels of a computer we have :
*b) electronic circuits (hardware) only
2) Rate these from smallest to largest
*a) bit, byte, kilobyte, megabyte, gigabyte
3) John Mauchly created the first :
*c) electronic numerical integrator and calculator
4) John Von Neumann :
*c) is credited with the idea of the first stored program computers
5) Binary numbers are numbers in which base?
*d) 2
6) Convert this base 10 number into an unsigned base 2 number
230 in base 10 is ???? in base 2.
*a) 1110 0110
7) Convert this UNSIGNED binary number to an unsigned octal number
1110 0110 in binary is ??? in octal.
*c) 346
7) Convert this UNSIGNED binary number to an unsigned hexidecimal number
1110 0110 in binary is ?? in hexidecimal.
*a) E6
8) Add these two unsigned binary numbers
0010 1001
+0111 0011
----------
*d) 1001 1100
9) Subtract these 2 unsigned binary numbers
0111 0001
-0010 1001
----------
*e) None of the above
10) To copy the file from /home/215/notes/week1.txt to your own directory you would type :
*e) none of the above
11) The proper UNIX command to grant file permissions is :
*c) chmod example: chmod a+r asmt1.p
12) Which UNIX command allows you to read e-mail on our system?
*a) pine
13) Compiling a program, then editing the Pascal program in EMACS will :
*b) have no effect on the compiled file
14) UNIX is :
*a) an operating system
15) Every Pascal Program needs the following :
*e) a header and a body
16) Which statement executes a loop until a condition is true?
*a) repeat
17)
*a) if (a=b) then write("Hi Mom!");
18)
*b) if (a==b) then write("Show me the way to go home....").
19)
*e) { There are no errors in the above code }
20
*a) b=readln();