You are on page 1of 14

I

Fall 2023 IT1015:lntroduction to Computer Science

• 1 Ji
Mid-term

D-Day: 2023/11/09 13: 10 - 16:00

Student ID : B1229033 洲 “
“ Name: 旭
*
~t -
-------------------------------------------------------·---------- ____________________________________
,

fiU-ft: Jt- aPo M~sou. ~Ulsollo


ra~~B:
#1
Summarize the difference between a program and a process.

A strio\A}
/' "--
Of

0 f ~c,tio....s _

#2
If each time slice in a multiprogramming operating system in 50 milliseconds and each context switch requires at most a 10
milliseconds, how many processes can the machine service in a single second?

#3
What is virtual memory?
tLt,
The we

#4
What are the conditions that lead to a deadlock?

D\JIJ

#5
What is a context switch?

fl 1o

ffi 1 1i I 14 Ji
/ Fall 2023 IT1015:lntroductlon to Computer Science

M2Ji
#6
Summarize the steps pMormed by the CPU when an Interrupt occurs.

#7
based on the UDP protocol?
What are some differences between a transport layer based on the TCP protocol and another

#8
WhatisDNS?

#9
What is the Process Control Block (PCB) in OS?

#10
are made shorter and shorter?
What problem arises as the lengths of the time slices in a multiprogramming operating system
What about as they become longer and longer?

., X
What is a router?

#12
What happens when two nodes using the CSMNCD encounter a collision in the networl(?

m2 n , :1t: 14 n
Fall 2023 IT1015:lntroduction to Computer Science
11 H 4- 1 ft I b t } L -t b1$-t 11. i

M3Ji
#13
What bit pattern Is rep~sented by each of the following dotted decimal patterns
a. 8.12.20.13 0 000101:>0 00001100 0001010 0
oooOllol
b. 10.1.1.250 00000001 , oo o o oo o I
c. 140.112.18.29 I I I I Io Io
d. 140.109.50.45 10 00110 o. 01110000 01>ol00f 0 0 00 I I IO I
(oOO 1100, OIIOIIO f. QOfloOIO o0jollOI

#14
layer.
List the four layers in the Internet software hierarchy and Identify a task performed by each

#15
than UDP? In what way could UDP
In what way could TCP be considered a better protocol for implementing the transport layer
be considered better than TCP?

#16
the difference in their use?
Mass storage, main memory and general-purpose registers are all storage systems. What is
:1 fmed off.
e~tu11al

'"' ..·, .,.,.....vl


off
{ \ J • (e~'->tu', ( fiPu) '',w,.t' re-~"'tk.- Ue J,.to. A.f1er' tit. r"'tr :1 t.. r•c.J
#17 '=lt,,~VO\ - f"' ro)_, ,
instruction types can the language
Suppose a machine language is designed with a op-code field of 8 bits. How many different
contain? What if the op-code field is increased to 16 bits?

;
,021r' 2 ( '2.
IQl'r •Jl'" (.

#18
Summarize the difference between a CISC architecture and a RICS architecture.

(,\~(. ~,1,k'tl'tt t1.tYt lfl>~ ,l.r t , fitf•f, o~ t\o~) to Jehvu .,.;th h:~ r l fo(MQl\e,i ,

1,1'1~ l.t> o1 ~ter)


;.,~J e.
°'
r•Lt)~
.J·,\t ~\SG c.(j{1tlct,.yt, . IA~e

ffi 3 fi I 7't 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

M41l
#19
What Is the pull)Ose of cache memory?

1.

#20
A computer has 128 MB of memory. How many bits are needed to address any single byte in memory?

#21
Assume the right shift operation is » and the left operation is «. So use the shift operation to divide an integer by 8 and to
multiply an integer by 64.

#22
What is the purpose of cache memory?

10

#23
Images are represented as a collection of dots called \,1te) .

:!c.be how a compute, c a ~ r r • c i ao,_ whoa pern>m>i"9 ""m•ri<al comp""'°"' ' " " tho"9h • has oot
malfunctioned

#25
Convert the following addition roblem into two's complement notation (using four bits per value), perform the addition, convert
the answer back into base ten notation, and explain the results.
cI
,o
6+3 I I
I, -7 0 /I I
C~f\l\Ot
rt -th~ mi.It}
Io->
f o I
00 I 0
} ...) O /

/ ll /
bttA~t .f o>'erf{oi,,l .

M 4 Ji I :It 14 Ji
Fall 2023 IT1015:lntroductlon to Computer Science

#26
ntation (!!Ingle precision 32 bits)
Convert 64.25 from Decimal to IEEE 754 Floating Point Represe

#27
32 bits)
Convert 9.75 fro Decimal to IEEE 754 Floating Point Representation (single precision

#28
What is Moore's law?
Tl.. F'o"}}ol '
tvio

#29
Explain the stored-program concept of the Von Neumann model.

#30
the other logic gates ?
Which gates can be used as universal logic gates to reproduce all

#31
Show me the truth table of AND, OR, NOT and XOR gal

A~O 0-- 0 R. t,JO 1


0 () _-;
0
0 0 Io_.,., o
0 0 -> 0 r o _,,, I o I -1 o
f O _.:, o I -7 I o I-,
0
0 \ -'J 0 1 I __,, I I -7
I I _, I

#32
The 4 main components of the Central Processing Unit (CPU).

cu.
#33
Explain the instruction cycle in 4 steps.

5 Ji / 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

M6Ji
#34
Based on the following two tables (T1 and T2):

Tl T2
--
DepartmcntlO Sales Department! D Name
I so l IT
I ISO 2 HR
2 250
2 350

1) Draw the schema of the two tables (T1 and T2)

2) interpret the result of the following SOL query:


SELECT
DepartmentlD, sales, name
FROM T1, T2
WHERE T1 .DepartmentlD = T2.DepartmenUD AND DepartmentlD = '2'

#35
Explain interrupt in operating systems

Two special purpose registers are used to control the program execution.

#37
List the 4 conditions for deadlock in operating systems.

M 6 Ji / 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

M7Ji
#38
Write a SQL for adding a new student In the Student table (Name ("IU Lee") and age ("26").

#39
Explain CSMA/CD and CSMA/CA.

#40
What is the von Neumann model, and what is the von Neumann bottleneck?

CD 1he. st•,\\ ""t1\ t.,J,,. .


\,..i; t, G1r,k~t..ri ..,·mo
1
l·,~·,tJ t~t VOii Nq ..,..6, • .., .... Jel,
1h 11.rJ,t(cti.re bOISt 01\

#41
What is an algorithm in computer science?

#42
Suppose an operating system allocates time slic s in 10 millisecond units and the time required for a context switch is
negligible.

A. How many processes can obtain a time slice in one second?

B. How many processes can obtain a time slice in one second if half of them use only half of their slice?

#43
What problem could r if, to all more processes lo share time in a multiprogramming environment, an operating system is
designed to use very s ort time slices?

#44
A __Vr'-o*~~fQ-~__ isa ns. In contrast, a __,,_.,_0 _<-e_~~>_ _ _ is the activity of executing those instructions.

#45
What bit pattern is represented by the IP address, 33.42.18, in dotted decimal notation?

ffi 7 Ji / 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

#46
Given a relation called People whose attributes are Name, Father, and Mother (containing each person's name as well as the
name of that person's parents), write an SOL statement to obtain a list of all the children of Nathan.

#47
What is Transaction in database system?

~8 I\
Explain share lock and exclusive lock in database system.

#49 X
Explain CR, LF and EOF in a text file.

#50
The+--- -- fundamental mechanism used in computer networking to establish a reliable connection between two
e steps of the mechanism.

llltlli:
ilUSll~~ tl~~
1 2 3 4 5 6 7 8 9 10

(, C e., e, e. \, cl 'n
°'-
11 12 13 14 15 16 17 18 19 20
(,,
0,. c.., & I@ 0.. C
°' /@
21 22 23 24 25 26 27 28 29 30 ,

°' i 'o 'o C 'o 0. d ;I~


31 32 33 34 35 36 37 38., 39 40

y
-

){ V© (._ (.., G e, y h /~
41 42 43 4-4 45 46 47 48 49 50

y Y@ y~ a. 'o c... d Y~ /e-@

ma 1t , 14 Jt
Fall 2023 IT1015:lntroduction to Computer Science

ll 9 Ji

1. Convert the hexadecimal representation (0x1 E) to base 10 representation.


a. 30 1 (o II IL I} I'f
b. 29 A C v' E
(}. C. 35
d. 15
e. 31 l't-f /~

2. Convert the hexadecimal representation (0x32) to base 10 representation.


a. 40
b. 70
C. 50
G d. 60
e. 80

3. Convert the base 10 representation (80) to binary representation.


a. (01110000)2 a-o~ is 4-0·" 0
b. (01011000)2 <rO~ l. ·- i,o .. ·O 'I- b
C. (01010000)2 t:.. to .. -0 l.. 2.
G d. (01110001h .,..c. _ ... o
-t

e. (01010001 h 10
=: i -
1
fh t bt
"1 ';. 1. •• • I
4. Convert the base 10 representation (31) to binary representation. . \
a. (01110000)2 31.:l.';. 15--·
b. (10100100)2 , r l:. 1 •· I
() C. (00100110)2 1 l :. $ ' .. I
v d. (01100100)2
e. (00011111)2 >~1:. I···\
5. Convert the base 10 representation (17) to binary representation.
a. (01001'2
b. (01001h
Q_; C. (01101h
d. (11001h
e. (10001h

6. Convert the 2's complement representation (110001)2to base 10 representation.


a. 40 I -t I bi' 11..
b. 38
c. 44
d. 38
e. 49

7. Convert the 2's complement representation (111001 )2 to base 10 representation.


a. 57
b. 55 I-f 8-tlb-tH-
C. 53
d. 63
e. 43

8. Convert the 2's complement representation (110110h to base 10 representation.


a. 52 "l-t~-\'l\,1i1..
"- b. 54
V c. 56
d. 48
e. 53

9. Convert the 2's complement representation (011011 h to base 10 representation.


a. 23 \-1-H%-t\\,
b. 25
C. 29
d. 27
e. 28

ffi 9 Ji / ;Jt 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

1110 Ji
10. 'Show the hexadecimal equivalent of the binary number (10011100110)2.
~- 0x4E2 ,s~
lb4'-t lb'-lu-t l
t\B c. 1/t
b. Ox4E6 ,., ,, ll. 1} l't f}O
c. 0x8E2 i

d. 0x6E2 2+i+t J1t t'tth-~t roi,lf'

e. 0x6E4 ,g
f01,~

11. Convert the decimal number 0.5 to binary.


= 1001110 tfOl.~
a. (0.1h
b. (0.01 )z
(A_ C. (0.11h
d. (0.0101 )z
e. (0.1001)i

12. Solve the subtraction problem (5 -11) by 2's complement notation.


a. (11101o)i
b. (11110h
C. (11010)2
(, d. (1011010)z o I\ O ( o Io
e. (110100)z
'J I o I

13. The IEEE floating-point standard is


a. IEEE 775
b. IEEE 774
C. IEEE 745
d. IEEE 754
e. IEEE 747

f14l The bit pattern (0100 0011 1~10 0000 0000 0000 0000 OOO0)z is stored in memory by the IEEE floating-point standard
'-rah-nat (32 bits). The value of thJ number is?
a. 448
b. 442
C c. 446
d. 444
e. 440

15. Use the AND operator on the bit pattern (10011000)z and (0010 1010)z.
a. (00001000)z ooro 1010
b. (0OOOOOO0)z o-;io0 1 • o O

C\ C. (00001100)z
d. (00011000)z
e. (10001000)z

16. Use the OR operator on the bit pattern (1001 1001)z and (0010 1110)z.
a. (10111101)2 9oro I I\ O

b. (11111111)z / 01 If I I I
C. (10011111)2
d. (10111111)z
e. (10111011)z
I I \I \ \ \\
17. A (01111111)z and 8 (0000 0001)2 are stored in 2's complement notation. Show how A is added to 8.
a. +130 I ooO oooo
b. -130 l I II I I l \
C c. Error:overflow
d. -128
e. +128

18. A (01111111)z and 8 (0000 0011)2 are stored in 2's complement notation. Show how A is added to B.
a. +130
f.:,0-l 0000
b. -130
C c. Error:overflow
111\1101

d. -128
e. +128

19. A computer has 16 MB of memory. How many bits are needed to address any sjngle byte in memory?

I; 1o A I :It 14 1t
Fall 2023 IT1015:lntroduction to Computer Science

M 11 Ji
a.I 24
b. 25
C. 26
d. 23
e. 27

20. The process of converting from analog to digital is called


a. modulation
b. telecommunication
c. switching
d. demodulation
e. pipeline

21. The basic architecture of computer was developed by


a. John Von Neumann
b. Charles Babbage
r;_. c. Blaise Pascal
d. Garden Moore
e. None of these

22. Arithmetic logic unit (ALU)


I. perform arithmetic operations
11. store data
111. perform comparsion
IV. communicate with input devices
from above the correct one is
a. lonly
b. II only
c. I and II only
d. I and Ill only
e. I, Ill and IV

23. One MB is equal to?


a. 1024 byte
b. 1024 KB
C. 1000 MB
d. 1000 KB
e. 1024 bit

24. The unique address of a web page or file on the Internet is called a(n)
a. domain
b. URL
'o c. HTTP
d. ICMP
e. Ping service

25. Which is not a type of database model?


a. relational
b. hierarchical
c. operational
G d. file
e. NOSQL

26. When a message is sent over the Internet it is divided into


a. pages
b. packets
'o c. bits
d. sites
e. bytes

27. Operating systems for large computers permit concurrent running of many unrelated programs by using
a. multiprogramming
b. shell
c. operating environment
d. service programs

M 11 Ji / ;It 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

M 12Jt
e.1 monoprogramming

28. The name of the system program that is executed at system beginning
a. BIOS
b. GUI

G\ c.
d.
supervisor
VO
e. queue

29. In general, how many things can be represented by n bits?


a. 2n
b. 2n+1
C. n2
d. 2"
e. 2"+1

30. Which of the following identifies the application to which a message arriving from the Internet should
be given?
a. IP address
b. Port number
c. Mac address
d. DNS
e. HTTP

31. Convert the following 32-bit IEEE format to a decimal number.


(1 01111101 1oooooooooooooooooooooo)i
a. -0.373
\) b. -0.374
C. -0.375
d. -0.376
e. -0.377

(§. Execution of an operating system is initiated by a program called the


a. Window manager
b. Scheduler
'o c.
d.
Boot loader
Memory manager
e. Device drivers

@ Which of the following is a technique for controlling access to a critical region?


a. Spooling
b. Time sharing
d c.
d.
Semaphore
Booting
e. Interrupt

34. Which of the following is not a means of performing multiple activities at the same time?
a. Pipelining
b. Multiprogramming
(' . c. Virtual memory
V d. Multiple processors
e. Multiple cores

35. Select the correct format in which a CPU executes an instruction


a. There Is not particular format in which a CPU executes an instruction, it is random
b. Decode the bit pattern, fetch the instruction from memory, perform the action
C c. Fetch the instruction from memory, decode the bit pattern, perform the action
d. Perform the action, fetch the instruction from memory, decode the bit pattern
e. Fetch the instruction from Hard Disk, decode the bit pattern, perform the action

36. If the main memory in a processor can store 256 unique address locations, how many bits are
used to reference the
locations?
a. 6
v b. 7
C. 8
d. 9

ffi 12 ft / 3t 14 ft
I Fall 2023 IT1015:lntroduction to Computer Science

Jg 13 Ji
e. ~o
37. Which of the following is the primary mechanism for representing the content of a web page?
a. UML
b. URL
c. DNS
d. HTTP
e. HTML

38. Which of the following is a device that a basic operation on electrical signals?
a. circuit

0 b. logic symbol
c. gate
d. register
e. signal register

39. How many bits are used in an IPv6 address?


a. 32
b. 128
C. 64
d. 48
e. 40

40. When a program is being executed, part of the program is in memory and part is on disk. Both part of memory is managed
by OS and work together as an entity, that is called
a. virtual memory
b. caching
{t c. memroy hierarchy
d. register
e. merged memory

41. The idea of a universal computation device was first described in around 1937 by
a. Albert Einstein
\ b. Alonzo Church
O c. Alan Turing
d. John von Neumann
e. Michael Jordan

42. For an 8-bit allocation, the largest decimal number that can be represented in two's complement form is
a. 8
b. 127
e, C. 128
d. 256
e. 255

43. In two's complement representation with a 4-bit allocation, we get _ _ _ when we add 5 to 5
a. -5
b/ol 0110
b. -6 .. , , 0
C. -7
d. -a I /oo
o IO\
e. -9

44. To set (force to 1) all the bits of a bit pattern, make a mask of all 1s and then _ _ _ the bit pattern and the mask.
a. AND
b. OR
C c. XOR
l 111 I I 1
d. NOT
e. NANO

45. The TCP/IP model has _ _ _ layers.


a. 4
b. 5
C. 6
d. 7
e. 8

13 Ji / 3t 14 Ji
Fall 2023 IT1015:lntroduction to Computer Science

14 Ji

46. What is the domain name In the e-mail address iy@gmaiLcom?


a. lu
b. gmall.com
c. gmall
d. .com
e. @gmall.com

@A process in the ready state goes to the running state when


a. it enters memory
b. it requests VO
C, c. it gets access to the CPU
d. it finishes running
e. it waits for VO

48. To prevent _ _ _, an operating system can put resource restric- tions on processes.
a. starvation
b. synchronization
C. paging
d. deadlock
e. partitioning

49. In the curl Lab (Lab#4), when a user needs to retrieve a document from the server, and the SSL connection uses the _ _
method in the HTTPS request.
a. SSL
b. SSH
(, c. DNS
d. TLS
e. HTTPS

50. Which of the following statements is false for the Turing machine?
1
a. A problem that can not be solved by a Turing machine can not be solved by any algorithmic system
b. Turing machine is a conceptual device rather than an actual machine
A halting problem is unsolvable by any Turing machine
d. An NP problem is unsolvable by any Turing machine
e. None of the above

14 ft / :Jt 14 ft

You might also like