Tests on the discipline of Computer Science 1. How many units in the binary representation of the decimal number 514? a) 2 b) 3 c) 4 d) 5 e) 6 2. Between settlements A, B, C, D, E, F constructed roads, the length of which is shown in the table. (The lack of numbers in the table means that the direct road between the points is not.) A B C D E F A 3 B 9 C 3 4 9 3 D 8 3 E 4 2 8 2 7 F 7 Determine the length of the shortest path between points A and F (if the move can only be built on the roads). a) 11 b) 13 c) 15 d) 17 e) 19 3. Dan fragment of the truth table expression F: x1 x2 x3 x4 x5 F 0 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 How expression can be F? a) x1 \/ x2 \/ x3 \/ ¬x4 \/ ¬x5 b) ¬x1 \/ x2 \/ ¬x3 \/ x4 \/ ¬x5 c) x1 /\¬ x2 /\ x3 /\ ¬x4 /\ x5 d) ¬x1 /\ x2 /\ x3 /\ x4 /\ ¬x5 e) ¬x1 /\ x2 /\ x3 /\ x4 /\ x5 4. In order to group operations with files using wildcards filenames. The mask is a sequence of letters, numbers and other allowable characters in file names, which can also meet the following characters: Symbol "?" (Question mark) means exactly one character. The symbol "*" (asterisk) is any sequence of characters of arbitrary length, including "*" and may set the empty sequence. The catalog is 6 files: • adobe.xls • idol.xlsx • london.xls • adobe.xml • odor.xlsx • sdoba.xls Determine which of the masks of them said group of files would select: • adobe.xls • idol.xlsx • odor.xlsx • sdoba.xls a)? do * .xls b)? do? *. xls * c) * do * .x * d)? do? .xls * e)? do.xls * 5. The machine receives the input of the two two-digit octal number. According to these numbers built a new octal number by the following rules: 1. Calculate the two octal number - the sum of the given numbers MSBs and LSBs sum of these numbers. 2. These two octal numbers are write one after another in ascending order (without separators). Example. Initial numbers: 66, 43. Bitwise amounts: 12, 11. Result: 1112. Determine which of the numbers may be proposed result of the machine. a) 1121 b) 112 c) 73 d) 28 e) 66 6. In cell G4 spreadsheet written formula = D $ 22 * $ D23. Note: In the `$ is used to denote the absolute addressing. What type of gain formula after cell G4 copied into cell F3? a) = C $ 22 * $ C23 b) = D $ 21 * $ D22 c) = D $ 21 $ C23 d) = C $ 22 * $ D22 e) = C $ 22 * $ D24 7. Produced two-channel (stereo) audio with a sampling frequency of 16 kHz and 32-bit resolution. Recording lasts 12 minutes, the results are written to a file, and data compression is performed. Which of the following numbers is closest to the size of the resulting file, expressed in megabytes? a) 30 b) 60 c) 75 d) 90 e) 45 8. For any of the above numbers X logical condition is true? ((X <25) → (X <23)) / \ ((X <22) → (X> 21)) a) 21 b) 22 c) 23 d) 24 e) 25 9. In the fragment database provides information about family relations. ID 1108 1010 1047 1037 1083 1025 1071 1012 1098 1096 1051 1121 1086 Таблица 1 Last name_N.P. Kairat E.R. Kekilova M.S. Ilyasova N.B. Bairakov S.B. Pernebekova V.I. Saylaubekova A.I. Bayrakov A.I. Bayrakov I.А. Bayrakov Т.A. Bayrakov Y.A. Mailybaev R.H. Pernebekov L.R. Pernebekov R.S. Gender F F F F F F М М М М М М М Таблица 2 ID_Parent ID_Child 1010 1071 1012 1071 1010 1083 1012 1083 1025 1086 1047 1096 1071 1096 1047 1098 1071 1098 1083 1108 1086 1108 1083 1121 1086 1121 Decide on the basis of the data name and initials granddaughter Bayrakov I.А. a) Bairakov S.B. b) Kairat E.R. c) Pernebekova V.I. d) Pernebekov L.R. e) Bayrakov Y.A. 10. To encode a sequence consisting of the letters A, B, C, D and E, used irregular binary code to uniquely decode the received binary sequence. Here's the code: A-10, B-001, B-0001, D-110, D111. Is it possible to reduce to one of the letters codeword length so that the code can still be decoded uniquely? Codes other letters should not change. Select the correct answer. a) It is impossible b) for the letter B - 000 c) for the letter B - 0 d) for the letter D - 11 e) for the letter D-111. 11. In some countries, car number 7 characters in length are composed of capital letters (involved 23 different letters) and decimal numbers in any order. Each number recorded in a computer program and a smallest possible integer number of bytes of the same (in this symbol-wise encoding is used and all encoded the same symbols and the least possible number of bits). Determine the amount of memory allocated by the program to record 50 rooms. a) 200 bytes b) 250 bytes c) 300 bytes d) 350 bytes e) 400 bytes 12. The program describes a one-dimensional integer array with indexes from 0 to n. The following excerpt from the same program written in different programming languages, processing this array: Бейсик Паскаль s=0 s:=0; z = A(n) z:=A[n]; FOR i = 0 TO n for i:=0 to n do begin IF A(i) > z THEN s = s + 1 if A[i]>z then NEXT i s:=s+1; end Си Алгоритмический язык s = 0; s:=0 z = A[n]; z:=A[n] for (i = 0; i <= n; i++){ bc for i from 0 to n if (A[i]> z) if A[i]> z to s++; s:=s+1 } all fc What is the value of s after the implementation of this program, for any values of the array elements? a) The maximum element in the array A b) the number of array elements A, the last element of the array of large c) index of the last element of the array A, which is less than A [0] d) The number of elements of the array A, the smaller of the last element of the array e) To what 13. System commands artist robots "living" in a rectangular maze on a checkered plane: Up Down Left Right When you run any of these commands, the robot moves one cell, respectively: up ↑, down ↓, left ←, right →. Four teams checks the validity of the conditions of the lack of walls at each side of the cell, where the robots: freely available from the top from the bottom left to right freely available Cycle WHILE <condition> command sequence UNTIL THE END executed until the condition is true. If the robot starts to move towards next to him the wall, it will collapse and the program will abort. Scheme of the labyrinth: How many cells of the labyrinth meet the requirement that, starting in it and perform the proposed program, the robot will survive and stay in the shaded cells (F6)? HOME WHILE <right or bottom freely available> WHILE <bottom freely> down UNTIL THE END WHILE <right freely> to the right UNTIL THE END UNTIL THE END END a) 18 b) 22 c) 26 d) 30 e) 33 14. Executive Calculators two teams who have numbers: 1. Take away 2 2. Section 3 Performing the first of them, Calculator takes the number 2 on the screen, and performing a second, divides it by 3 (if integer division is not possible, Calculator is disabled). Record order of instructions in the program get out of 37 the number 3, containing not more than 5 teams, indicating a number of commands. (For example, the program in 2121 - a program Divided into 3 Take away 2 Divided into 3 Take away 2 This program, for example, converts the number 60 to number 4.) a) 11211 b) 11212 c) 2112 d) 21211 e) 11221 15. Determine the value of c after the following code (written below in different programming languages): Бейсик a = 30 b=6 a=a/5*b IF a > b THEN c=a-4*b ELSE c=a+4*b ENDIF Си a = 30; b = 6; a = a / 5 * b; if (a > b) c = a - 4 * b; else c = a + 4 * b; Паскаль a := 30; b := 6; a := a / 5 * b; if a > b then c := a - 4 * b else c := a + 4 * b; Алгоритмический a := 30 b := 6 a := a / 5 * b если a > b то c := a - 4 * b иначе c := a + 4 * b все a) 12 b) 11 c) 10 d) 15 e) 14 16. Gave fragment spreadsheet: A B 1 4 2 C 2 =2(A1–C1) =(2B1+A1)/4 =C1-1 What integer must be written in the cell C1 that built after the calculation chart from the valuesof the cell range A2: C2 consistent pattern? a) 3 b) 2 c) 5 d) 6 e) 8 17. All the 5-letter words composed of the letters E, F, I, written in alphabetical order and numbered. Here is the beginning of the list: 1. EEEEE 2. EEEEZH 3. EEEEI 4. EEEZHE Write down a word, which stands at number 238. a) IIIZHE b) IIZHZHE c) IZHZHEE d) EZHZHII e) ZHZHIII 18. Determine what will be printed because of executing a program recorded below in different programming languages: Бейсик Паскаль DIM N, S AS INTEGER var n, s: integer; N=1 begin S=0 n := 1; WHILE N <= 101 s := 0; S=S+7 while n <= 101 do N=N+1 begin WEND s := s + 7; PRINT S n := n + 1 end; Си #include<stdio.h> void main() { int n, s; n = 1; s = 0; while (n <= 101) { s = s + 7; n = n + 1; } printf("%d", s); } a) 707 b) 705 c) 800 d) 669 e) 703 write(s) end. Алгоритмический алг нач цел n, s n := 1 s := 0 нц пока n <= 101 s := s + 7 n := n + 1 кц вывод s кон 19. The algorithm for computing the value of the function F (n), where n - integer, given by the following relationship: F (n) = F (n-1) + 2⋅F (n-2) for n> 2 F (1) = 0 F (2) = 1 What is the value of F (6)? In response to record the only positive integer. a) 10 b) 20 c) 11 d) 15 e) 12 20. Decimal 63 in some notation is written as 120. Determine the radix. a) 2 b) 6 c) 16 d) 8 e) 7 21. Figure - scheme of roads linking the city A, B, C, D, E, F, G, I, K, and L. In every way you can move in only one direction of the arrow. How many different ways from city A to city to? a) 19 b) 20 c) 18 d) 17 e) 21 22. Document 5 MB can be transferred from one computer to another in two ways: A) compressed file, transfer the file over a communication channel, unpack B) transmit over the communication channel without using the archiver. What a way to quickly and how much, if • the average data rate of the communication channel is 218 bits per second, • The volume of the compressed document archiver is 20% of the original, • the time required to compress the document - 7 seconds to decompress - 1 second? In response, write the letter A, if method A or B faster, faster way if B. Immediately after the letter write the number of seconds, as one way faster than the other. For example, if the method B A quick way to 23 seconds, in response to write B23. The words "second", "seconds.", "C." To add to the answer is not necessary. a) A120 b) A130 c) B155 d) B120 e) A125 23. In the terminology of TCP / IP network mask of the network is called a binary number that indicates which part of the IP-address of the network node refers to a network address, and what - to the address of the node in the network. Typically, the mask is written by the same rules as the IP-address. The network address is obtained by applying the bitwise conjunction to the specified IP-address unit and the mask. For a given IP-address and mask define the node network address. Node IP-address: 217.9.191.133 Mask: 255.255.192.0 When writing an answer, select from the numbers given in the table four elements of IPaddresses and write in the correct order corresponding letters without points. A B C D E F G H 0 9 16 64 128 142 192 Example: Suppose that the desired IP-address 192.168.128.0 and is a table A B C D E 217 F G H 128 168 255 8 127 0 17 192 In this case, the correct answer will be written in the form: HBAF a) BBFA b) HBFA c) HBEA d) CABE e) EFGH 24. In the query language search engine to designate a logical operation "OR" is used symbol «|», and for logic operation "AND" - the symbol "&". The table shows the number of inquiries and found them pages of some segment of the Internet. Inquiry Search results pages (in thousands) Kunanbayev 3500 Auezov 2000 Kunanbayev | Auezov 4500 What is the number of pages (in thousands) will be found for Kunanbayev & Auezov? It is believed that all requests were made almost simultaneously, so that the set of pages containing all search words did not change during query execution. a) 1020 b) 2000 c) 1500 d) 4500 e) 1000 25. How many different sets of values of logical variables x1, x2, x3, x4, x5, y1, y2, y3, y4, y5, which meet all the following conditions? (X1 → x2) / \ (x2 → x3) / \ (x3 → x4) / \ (x4 → x5) = 1 (Y1 → y2) / \ (y2 → y3) / \ (y3 → y4) / \ (y4 → y5) = 1 x1 \ / y1 = 1 The response does not need to list all the different sets of values of the variables x1, x2, x3, x4, x5, y1, y2, y3, y4, y5, which is made with this system of equations. In response, you need to specify the number of such sets. a) 11 b) 12 c) 14 d) 16 e) 10