|台師大資工暑轉:詳解文章前言
此篇文章為:台師大資工轉學考 104 學年度「計算機概論」的解答、詳解。需要其他學年度的歷屆題、計算機概論和微積分的解答詳解,可點擊至主要文章!
-尊重智慧財產權
此篇詳解為本人所撰寫,禁止:轉貼、修改、和商業使用!歡迎分享網址連結!
-互相交流討論
因為此篇詳解為本人獨自撰寫,如有錯誤的地方,或是對於解答有其他意見,都歡迎在下方的留言區一起討論!一起撰寫出正確完整的詳解!
|國立臺灣師範大學 104 學年度學士班二年級轉學生招生考試:資工歷屆題「計算機概論」詳解
一、單選題
1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|
D | D | B | C | C |
6 | 7 | 8 | 9 | 10 |
B | D | A | C | D |
11 | 12 | 13 | 14 | 15 |
A | C | D | B | A |
16 | 17 | 18 | 19 | 20 |
C | D | A | C | D |
21 | 22 | 23 | 24 | 25 |
A | C | C | D | C |
|台師大資工暑轉歷屆題:104 計概詳解
一、單選題
1. Which one of the following values is the biggest?
(A)(10000000)₂
(B)(100)₁₀
(C)(111)₁₆
(D)(11111)₈
解答:(D)(11111)₈。
詳解:最直接方便的方式就是通通轉換成十進位。
(A)(10000000)₂=(2⁷)₁₀=(128)₁₀
(B)(100)₁₀=(100)₁₀
(C)(111)₁₆=(1+16+16²)₁₀=(273)₁₀
(D)(11111)₈=(1+8+8²+8³+8⁴)₁₀=(4681)₁₀
所以, 4681>273>128>100。
2. With 8 bits, let[a, b]be the available range of integers represented by the sign-and-magnitude representation and let[c, d]be the available range of integers represented by the two's complement representation. Which of the following statements is wrong?
(A)c<a
(B)b=d
(C)|a|=|b|
(D)(a+b)=(c+d)
解答:(D)(a+b)=(c+d)。
詳解:先找出 a、b、c、d 的值:
- a=(11111111)₂= −127
- b=(011111111)₂=127
- c= −2⁷= −128
- d=2⁷ − 1=127
所以,(D)(a+b)=(c+d):0= −1 是錯的。
3. Which of the following values is represented by(11000011)₂ in the two's complement representation?
(A)−60
(B)−61
(C)−62
(D)−63
解答:(B)−61。
詳解:
二的補數 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 |
---|---|---|---|---|---|---|---|---|
負數 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 |
- | 32 | 16 | 8 | 4 | 1 |
所以:(11000011)₂= −(32+16+8+4+1)= −61
4. The language of country A consists of 100 symbols and requires 7 bits to represent all of them. The language of country B consists of 50 symbols and requires 6 bits to represent all of them. If we want to represent all symbols from these two countries, how many bits(at least)do we need?
(A)13
(B)12
(C)8
(D)7
解答:(C)8。
詳解:
100 symbols 需要 7 bits,因為 2⁶=164<100<128=2⁷。
50 symbols 需要 6 bits,因為 2⁵=32<50<64=2⁶。
兩座城市的 symbols 合起來共 100+50=150 個 symbols,至少需要 8 bits,因為 2⁷=128<150<256=2⁸。
5. The bits of a true-color pixel is(11111111 00000000 11111111)₂. How can we make the pixel black?
(A)AND(11111111 11111111 11111111)₂
(B)OR(00000000 00000000 00000000)₂
(C)XOR(11111111 00000000 11111111)₂
(D)OR(00000000 11111111 00000000)₂
解答:(C)XOR(11111111 00000000 11111111)₂。
詳解:在 True-Color 的定義中,三組數字分別為 Red Green Blue(RGB)
- 黑色:(00000000 00000000 00000000)₂
- 白色:(11111111 11111111 11111111)₂
所以我們要用邏輯運算子將題目的(11111111 00000000 11111111)₂ 改成(00000000 00000000 00000000)₂。以下將「00000000」簡化成「0」;將「11111111」簡化成「1」。
(A)AND(11111111 11111111 11111111)₂
1 | 0 | 1 | |
AND | 1 | 1 | 1 |
結果 | 1 | 0 | 1 |
(B)OR(00000000 00000000 00000000)₂
1 | 0 | 1 | |
OR | 0 | 0 | 0 |
結果 | 1 | 0 | 1 |
(C)XOR(11111111 00000000 11111111)₂
1 | 0 | 1 | |
XOR | 1 | 0 | 1 |
結果 | 0 | 0 | 0 |
(D)OR(00000000 11111111 00000000)₂
1 | 0 | 1 | |
OR | 0 | 1 | 0 |
結果 | 1 | 1 | 1 |
6. Assuming that no overflow occurs, how many times do we have to apply the arithmetic left shift operation to multiply an integer by 4?
(A)1
(B)2
(C)3
(D)4
解答:(B)2。
詳解:向左瞬移一次相當於乘以 2 的效果,所以如果需要乘以 4,就要向左瞬移兩次。
7. I/O addressing:Which of the following statements is wrong?
(A)In the isolated I/O method, the instructions to read memory are different from those to read I/O devices.
(B)In the memory-mapped I/O method, the CPU does not have separate instructions for transferring data from memory and I/O devices.
(C)The memory-mapped I/O needs a smaller number of instructions than the isolated I/O method.
(D)In the memory-mapped I/O method, the I/O addresses can overlap with memory addresses without any ambiguity.
解答:(D)In the memory-mapped I/O method, the I/O addresses can overlap with memory addresses without any ambiguity.。
詳解:
isolated I/O | memory-mapped I/O | |
---|---|---|
指令 | 不同 | 相同 |
指令 | 2 種 | 1 種 |
地址 | 重複 | 不重複 |
8. Machine cycle:In the ___ phase, the control unit copies the next instruction into the ___ in the CPU. The address of the instruction to be copied is stored in the ___ register.?
(A)fetch, instruction register, program counter
(B)decode, instruction register, program counter
(C)fetch, program counter, instruction register
(D)decode, program counter, instruction register
解答:(A)fetch, instruction register, program counter。
詳解:
- The program counter:儲存下一個程式指令在 Memory 中的地址。
- The instruction register:儲存下一個要執行的程式指令。
9. A computer uses memory-mapped I/O addressing. The address bus uses 8 bits. If its memory has 200 words, how many 8-register controllers can be accessed by the computer?
(A)5
(B)6
(C)7
(D)8
解答:(C)7。
詳解:地址共 2⁸=256 個,memory 只使用 200 個,所以有 256 − 200=56 個是給其他裝置的。每個 8-register controller 佔 8 bits,所以能連接 56 ÷ 8=7 個。
10. Network topology:In a ___ topology, every device has a dedicated connection to every other device. In a ___ topology, each device has a dedicated link with only the two devices on either side of it.
(A)bus, star
(B)bus, ring
(C)ring, mesh
(D)mesh, ring
解答:(D)mesh, ring。
詳解:
- Bus Topology:各節點連接到一個公用的網絡上。
- Star Topology:各節點連接到一個網絡集中設備。
- Ring Topology:每個節點連接左右兩個節點,將各節點串成一個環狀。
- Mesh Topology:網狀網絡拓墣。
11. UDP vs. TCP:Which of the following statements is wrong?
(A)UDP does not add a checksum to the packet.
(B)In UDP, if the receiver found the packet corrupted, it does not ask the sender to resend it.
(C)UDP does not use the sequence numbers.
(D)TCP uses sequence numbers, acknowledgment numbers, and checksums.
解答:(A)UDP does not add a checksum to the packet.。
詳解:TCP/IP 分為五層
- Application:client-server、peer-to-peer(P2P)、WWW、HTTP、URL、FTP、Email、TELNET、Secure Shell(SSH)、Domain Name System(DNS)、STMP
- Transport:port number、User Datagram Protocol(UDP)、Transmission Control Protocol(TCP)
- Network:Packetizing、Routing、IP、IPv4、IPv6
- Data link:Local area networks(LANs)、Ethernet、WiFi、WANs、MAC
- Physical:Analog&Digital
User Datagram Protocol(UDP) | Transmission Control Protocol(TCP) |
---|---|
connectionless | connection-oriented |
不可靠的傳輸層協定 | 可靠的傳輸層協定 |
8 bytes Header | 20 to 60 bytes Header |
use checksums | |
use sequence numbers | |
use acknowledgment numbers |
12. TCP/IP protocol:The IP address, MAC address, and port number are used in the ___, ___, and ___ layer, respectively.?
(A)transport, data link, network
(B)transport, network, data link
(C)network, data link, transport
(D)network, transport, data link
解答:(C)network, data link, transport。
詳解:TCP/IP 分為五層
- Application:client-server、peer-to-peer(P2P)、WWW、HTTP、URL、FTP、Email、TELNET、Secure Shell(SSH)、Domain Name System(DNS)、STMP
- Transport:port number、User Datagram Protocol(UDP)、Transmission Control Protocol(TCP)
- Network:Packetizing、Routing、IP、IPv4、IPv6
- Data link:Local area networks(LANs)、Ethernet、WiFi、WANs、MAC
- Physical:Analog&Digital
13. David's company owns a class-C network 193.194.195.0~193.194.195.255. If they want to divide the network into 8 subnets, what is the subnet mask?
(A)255.255.255.0
(B)255.255.255.128
(C)255.255.255.192
(D)255.255.255.224
解答:(D)255.255.255.224。
詳解:要切出 8 個 subnet,subnet mask 的最後一組數字就要有 3 個 1(因為 8=2³),11100000=224。
14. An operating system uses the paging technique to manage memory. The computer has 64 MiB of memory and now needs to load four programs of 3 MiB, 10 MiB, 20 MiB, and 25 MiB, respectively. Which of the following is the maximal page size to load all four programs successfully?
(A)4 MiB
(B)5 MiB
(C)6 MiB
(D)7 MiB
解答:(B)5 MiB
詳解:
(A)4 MiB:
64 MiB 可分成完整 16 個 page。
四個程式各需:1、3、5、7 個 page,共 15 個 page。
(B)5 MiB:
64 MiB 可分成完整 12 個 page,餘 2 MiB。
四個程式各需:1、2、4、5 個 page,共 12 個 page。
(C)6 MiB:
64 MiB 可分成完整 10 個 page,餘 4 MiB。
四個程式各需:1、2、4、5 個 page,共 12 個 page。
(D)7 MiB:
64 MiB 可分成完整 9 個 page,餘 1 MiB。
四個程式各需:1、2、3、4 個 page,共 10 個 page。
15. A process is a program in execution. Which of the following states is not a state of process?
(A)Terminated
(B)Ready
(C)Waiting
(D)Running
解答:(A)Terminated。
詳解:一個程式有三種型態:
- Program:存在硬碟中沒被呼叫。
- Job:當 Program 被呼叫,但還沒載入到 memory 時,稱為 Job。(可能是 memory 還沒空位)有兩種狀態:Hold、Terminated。
- Process:Job 載入 memory 後就稱為 process。有三種狀態:Ready、Running、Waiting。
16. CPU scheduling:We are given three jobs A, B, and C, which require 8, 3, and 5 units of time, respectively. We use the shortest-job-first(SJF)scheduling algorithm. What is the average turnaround time?
(A)5.33
(B)11.67
(C)9
(D)2.67
解答:(C)9。
詳解:turnaround time 算累計的時間單位
3 | 8 | 16 |
B | C | A |
所以 the average turnaround time=(3+8+16)÷ 3=9。
17. Which of the following sorting algorithms has different complexity from the others?
(A)Bubble sort
(B)Selection sort
(C)Insertion sort
(D)Merge sort
解答:(D)Merge sort。
詳解:
(A)Bubble sort:O(n²)
(B)Selection sort:O(n²)
(C)Insertion sort:O(n²)
(D)Merge sort:O(n × log n)
18. We are searching for a certain integral value among 1,000,000 values. Let x denote the maximal number of values we need to check by using the linear search algorithm, and let y denote the maximal number of values we need to check by using the binary search algorithm. The value of x/y is approximately ___.
(A)50000
(B)5000
(C)100000
(D)20
解答:(A)50000
詳解:
x=1000000
y=20(因為 2¹⁹=524288;2²⁰=1048576)
所以,x/y=1000000/20=50000
19. We have a two-dimensional integer array A[4][3]. We know that an integer occupies 4 bytes and the address of A[1][1] is 2000. What is the address of A[3][2]?Assume that the array uses row-major storage.
(A)2020
(B)2024
(C)2028
(D)2048
解答:(C)2028。
詳解:將陣列畫出,答案就出來了!
A[0][0] | ||
---|---|---|
1984 | ||
A[1][0] | A[1][1] | |
2000 | 2004 | |
A[2][0] | ||
2008 | 2012 | 2016 |
A[3][0] | A[3][1] | A[3][2] |
2020 | 2024 | 2028 |
20. The following is a simple C program. The operator % means the modulo operation. Please answer how many times f()is called by running this program once.
#include<stdio.h> |
(A)1
(B)2
(C)4
(D)8
解答:(D)8
詳解:總共會呼叫的 f()
函式:f(3)
、f(10)
、f(5)
、f(16)
、f(8)
、f(4)
、f(2)
、f(1)
,共呼叫 8 次。
21. A stack is a data structure, whose feature is last-in-first-out(LIFO). We have three values 1, 2, and 3. PUSH(x)will put the value x into the stack, and POP will output a value. We limit that the action PUSH(1)should be done earlier than PUSH(2), and PUSH(2)is earlier than PUSH(3).The only constraint for POP is that it can be applied only when the stack is not empty. Which of the following output sequences is not possible to get after calling three PUSH actions and three POP actions?
(A)3, 1, 2
(B)1, 2, 3
(C)1, 3, 2
(D)2, 1, 3
解答:(A)3, 1, 2。
詳解:
(B)1, 2, 3:PUSH(1)/POP/PUSH(2)/POP/PUSH(3)/POP
(C)1, 3, 2:PUSH(1)/POP/PUSH(2)/PUSH(3)/POP/POP
(D)2, 1, 3:PUSH(1)/PUSH(2)/POP/POP/PUSH(3)/POP
22. We are given a binary search tree of height 2. We also know that the binary search tree stores four values 99, 15, 37, and 56. Which of the following statements is wrong?(The root node is at level 0.)
(A)99 is not possible to be the root node.
(B)15 may be at level 1.
(C)37 is not possible to have two child nodes.
(D)56 may be a leaf node.
解答:(C)37 is not possible to have two child nodes.
詳解:二元樹的定義:其一子節點小於母節點,另一子節點大於母節點。
23. We have a 100-character string, which consists of only five different letters 'A', 'B', 'C', 'D', and 'E'. The times of occurrences of these five letters are 20, 25, 40, 10, and 5, respectively. By using Huffman coding, how many bits do we use to encode 'A'?
(A)1
(B)2
(C)3
(D)4
解答:(C)3。
詳解:
- A:001
- B:01
- C:1
- D:0001
- E:0000
24. Cindy uses a very simple method for error detection and correction. When storing an integer value X=x₁x₂ ... xₙ(1 ≤ xi ≤ 9, for 1 ≤ i ≤ n), she appends(x₁+x₂+...+xₙ)Mod 10 as an extra digit x₍ₙ₊₁₎. For example, to store a value X=863, she actually stores 8637. One day, Cindy finds that one digit in a stored value is missing:9438⍰235. Please help her to find the missing digit.
(A)3
(B)4
(C)5
(D)6
解答:(D)6。
詳解:
假設 y=⍰
(9+4+3+8+y+2+3)÷ 10=...5
(29+y)÷ 10=...5
所以,y=6
25. Which of the following languages is not an object-oriented language?
(A)C++
(B)Java
(C)Lisp
(D)C#
解答:(C)Lisp。
詳解:
- Procedural:FORTRAN、COBOL、BASIC、C、Pascal、Ada
- Object-oriented:Smalltalk、C++、Visual Basic、C#、Java
- Functional:LISP、Scheme
- Declarative:Prolog
|台師大資工暑轉詳解相關文章:
- 台師大各年度資工「轉學考歷屆&詳解」計概、微積分解答!
- 台師大 106 資工暑轉:計概詳解!
- 台師大 105 資工暑轉:計概詳解!
- 台師大 104 資工暑轉:計概詳解!
- 台師大 103 資工暑轉:計概詳解!
- 台師大 102 資工暑轉:計概詳解!