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.


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.

The 408 contains four subjects, including various basic computer theories, even if you do not take the postgraduate entrance examination, it is very good to know some basic knowledge by taking the questions.

🌴 Data structure

If a stack is stored as vector V[1… n] and the initial pointer top of the stack is n+1, then the correct operation for pushing x into the stack is ___ (University of Chinese Academy of Sciences, 2015年)

A. top=top+1; V[top]=x
B. V[top]=x; top=top+1
C. top=top-1; V[top]=x
D. V[top]=x; top=top-1
Copy the code

parsing

Answer: C

📢 1~n storage, top points to n+1, so first let top point to the address to store, then assign a value, so choose C.

Generally, there are two Pointers in the stack. One is the fixed end, called bottom, and the other is the variable pointer, called top. During the process of loading and unloading, top changes constantly.

If top points to n, it indicates that top points to the address to be saved every time. In this case, assign and modify the top pointer.

🌳 Computer network

The correct statement about Manchester coding is ___ (Chongqing University of Posts and Telecommunications 2007)

A. Each signal starting boundary serves as a clock signal in favor of synchronization B. Include both clock and data values in the signal C. This analog signal encoding mechanism is particularly suitable for the transmission of sound D. No jump in the middle of the bit indicates that the signal value is 0Copy the code

parsing

The answer:

📢 Manchester encoding divides each symbol into two equal intervals:

  • If the first interval is high level and the second interval is low level, it means that symbol 1 and symbol 0 are opposite, so D is wrong.

  • A) clock B) data C) clock D) data

  • The Manchester code contains the clock and data in the data stream. When the code information is transmitted, the clock synchronization signal is also transmitted to each other. Therefore, A is wrong.

  • Each symbol is adjusted to two levels, so the data transmission rate is only half of the modulation rate.

For example, the binary number 10011010 can be represented like this:

🌵 Operating system

In time-sharing operating systems, process scheduling often adopts ___ algorithm (University of Chinese Academy of Sciences, 2015)

A. Time slice rotation B. Highest priority C. first come, first served D. randomCopy the code

parsing

Answer: A,

📢 Common sense: Time slice rotation (RR) scheduling algorithms are designed specifically for time-sharing systems.

Each process is assigned a period of time, called its slice, which is the amount of time the process is allowed to run. If the process is still running at the end of the time slice, the CPU is stripped and allocated to another process. If the process blocks or ends before the time slice ends, the CPU switches immediately.

🌲 Computer composition principle

Suppose the internal register content of a machine is 11111111, if it is equal to -0, then the machine is represented by (1);

If it is equal to -1, the machine is denoted by (2). The correct answer is ___ (University of Chinese Academy of Sciences, 2017)

A. (1) complement; (2) radix-minus-one complement b. (1) the complement; (2) original code C. (1) inverse code; (2) complement D. (1) shift; (2) the complementCopy the code

parsing

Answer: C

📢 Common sense: 0 is positive or negative in both source and inverse codes, but not in complement, so the complement can represent a negative number with the largest absolute value (all 1).

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)