Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

This article has participated in the “Digitalstar Project” and won a creative gift package to challenge the creative incentive money.


408 contains four subjects, including a variety of basic computer theory, even if you do not take the postgraduate entrance examination, it is good to know some basic knowledge. Welcome to me and my column ๐Ÿ”ฅ

Borrow a big man’s words: for a programmer, the basic knowledge of the computer is internal power, is our professional accomplishment, only deep internal power can walk the river’s lake less.

Programmers can go far, can write high-quality code, can quickly find the bottleneck of the system, can quickly find the core functions of the system, and our professional literacy must be related. Only if you know the basics well enough, can you be truly proficient in your work and solve problems more efficiently and gracefully.

๐Ÿ™ˆ Data structure

Suppose n keywords (n=2h-1) constitute a binary sorting tree. Assuming that the probability of finding each keyword is the same, the maximum average length of successful search is ___. (University of Chinese Academy of Sciences, 2018)

A.n
B.(n+1)/2
C.n/2
D.n+1
Copy the code

parsing

Answer: B

The maximum average search length of ๐Ÿคก is that each node has only one child node, and the total search length is


1 + 2 + . . . + n = n ( n + 1 ) 2 1 + 2 +… +n = \frac{n(n+1)}{2}

Divided by the probability of finding each node, divided by n, so that’s choice B.

๐Ÿต Computer network

The maximum length of an IP datagram is ____. (East China University of Science and Technology, 2006)

A.1500 B. 65535 C. 1518 D. 25632Copy the code

parsing

Answer: B

๐Ÿคก In the FORMAT of IP datagram, the total length field takes up 16 bits and refers to the length of the header and the sum of data, in bytes (B). Therefore, the maximum length of the datagram is 65,535B, which is selected B.

๐Ÿ™Š Operating system

The disk is a shareable device, so every time the ___ job starts it. (Wuhan University of Technology, 2005)

A. You can have as many B's as you want. I can constrain multiple C's. You can have at least one D. There can be at most oneCopy the code

parsing

Answer: D

๐Ÿคก While it is possible to transform an exclusive device into a shared device with SPOOLing technology, only logical devices are assigned to each process, and physically only one job can use disks at any one time. The same is true for process execution in a single-CPU system, where only one process can use the CPU at a time, although processes can execute in parallel.

๐Ÿ™‰ Computer composition principle

A computer I/O device adopts asynchronous serial transmission to transmit character information in the format of 1 bit start bit, 7 bit data bit, 1 bit check bit and 1 bit stop bit. If 640 characters per second is required, the data transfer rate for the I/O device should be ______. (Xi ‘an Jiaotong University, 2004)

A. 640B/s B. 6400B/s C. 640B/s D. 6400bit/sCopy the code

parsing

Answer: D

๐Ÿคก Simple calculation


( 7 + 1 + 1 + 1 ) โˆ— 640 = 6400 b i t / s (7+1+1+1)*640 = 6400bit/s

The exercises come from @Wangdao Weibo

The analysis is written by myself, if there are any questions or mistakes, please comment.

I am Mancuoj, welcome to pay attention to me and my computer entrance examination column (โ‰งโˆ‡ Blue)