• Save
Basic Theory (FE)
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Basic Theory (FE)

on

  • 1,663 views

Basic Theory

Basic Theory
Fundamental IT Engineers Examination

Statistics

Views

Total Views
1,663
Views on SlideShare
1,663
Embed Views
0

Actions

Likes
5
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Basic Theory (FE) Presentation Transcript

  • 1. Basic Theory (FE) by Tanat Tonguthaisri itpe@nstda.or.th
  • 2. 1. Which of the following arithmetic expressions iscorrect? Here, a number is written in radix notation;that is, a decimal subscript following the number (i.e.numberradix) is used to indicate the radix. a) 10102 + 108 = 1710 b) 11012 + 416 = 1710 c) 148 + 112 = 1610 d) B16 + 102 = 1410
  • 3. 10102 + 108 = 17108+2 + 8 = 1811012 + 416 = 17108+4+1 + 4 = 17148 + 112 = 16108+4 + 2+1 = 15B16 + 102 = 141011 + 2 = 13
  • 4. 2. When the binary fraction 11101.110 is subtractedfrom the binary fraction 101101.101, what is the correctresult? a) 111.001 b) 111.111 c) 1111.001 d) 1111.111
  • 5. 101101.101 – 11101.110= 101101.101 – (11101.101 + 0.001)= 101101.101 – 11101.101 - 0.001101101.101 11101.101 10000.00010000.000 – 0.001 = 1111.111
  • 6. 3. When a certain natural number x can berepresented by a 2n-digit binary number consisting of 1and 0 arranged alternately, i.e. 1010...10, which of thefollowing equations holds for x? a) x + x /2 = 2 2 n b) x + x /2= 2 2 n -1 c) x + x /2= 2 2 n +1 d) x + x /2= 2 2 n +1 -1
  • 7. http://getphilnitscertified.wordpress.com/ 2011/10/27/2007-october-fe-am- q3/#more-474
  • 8. 4. There is an 8-bit numerical value, where a negativenumber is represented in two’s complement. Whenthis value is represented in decimal, it becomes -100.When this value is regarded as an unsigned number,which of the following is the correct value in decimal? a) 28 b) 100 c) 156 d) 228
  • 9. 8-bit  11111111 = 255100 = 64 + 32 + 4 = 2 6 + 25 + 22 = 011001002100110112 = 155155 + 1 = 156
  • 10. 5. When multiple values are added arithmetically, it isrecommended that the values be added sequentially,starting from the number whose absolute value is thesmallest. Which of the following errors can be reducedby means of this method? a) Cancellation of significant digits b) Loss of trailing digits c) Truncation error d) Underflow
  • 11. 6. The figure below shows daily changes in the weather for a givendistrict, and each value represents the probability of changes in thefollowing day’s weather. When the weather is rainy on a given day, whatis the probability that the weather is clear two days later? a) 0.15 b) 0.27 c) 0.3 d) 0.33
  • 12. Rainy, Rainy, Clear = 0.2 x 0.3Rainy, Clear, Clear = 0.3 x 0.4Rainy, Cloudy, Clear = 0.5 x 0.30.3 x (0.2 + 0.4 + 0.5) = 0.3 x 1.1 = 0.33
  • 13. 7. Which of the following operations does not change the lower 4 bits of an 8-bit string?a) A logical product (i.e. AND) with a bit string 0F in hexadecimalb) A logical sum (i.e. OR) with a bit string 0F in hexadecimalc) A negative logical product (i.e. NAND) with a bit string 0F in hexadecimald) An exclusive logical sum (i.e. exclusive OR) with a bit string 0F in hexadecimal
  • 14. 8. In a certain company, there are a total of 400employees including 100 smokers. The numberof male employees is 250, including 75 malesmokers. What is the probability that anemployee selected at random is a femalenonsmoker?a) 3 b) 3 c) 5 d) 5 4 8 6 16
  • 15. 100 smokers – 75 male smokers = 25 female smokers400 employess – 250 male employees = 150 female employees150 female employees – 25 female smokers = 125 female non-smokers 125 / 400 = 5 / 16
  • 16. 9. The decision table shown below is used to determine whetheror not an order can be accepted in a sales order processingsystem. Which of the following logical expressions is equivalentto “Accept order”? Here, “NOT” is used for the logical negation,“AND” for the logical product, and “OR” for the logical sum. Bad debt within 2 Years (X) Y Y Y Y N N N N Credit excess $10,000 (Y) Y Y N N Y Y N N Age of customer > 10 Years (Z) Y N Y N Y N Y N Accept order X X X Reject order X X X X X a) (NOT X) AND (NOT Y OR NOT Z) b) (NOT X) AND (NOT Y OR Z) c) (NOT X) AND (Y OR Z) d) X AND (NOT Y OR NOT Z)
  • 17. Bad debt within 2 Years (X) Y Y Y Y N N N NCredit excess $10,000 (Y) Y Y N N Y Y N NAge of customer > 10 Years (Z) Y N Y N Y N Y NAccept order X X XReject order X X X X X (not X and Y and Z) or (not X and not Y) = not X and [ (Y and Z) or not Y ] = not X and (Z or not Y)
  • 18. 10. Which of the following sets is equivalent tothe set S -(T  R)? Here, “  stands for a ”product set operation, “  for a union set ”operation, and “-” for a difference set operation. a) (S –T )-R b) (S –T )  (S –R ) c) (S –T )  (T –R ) d) (S –T )  (T –R )
  • 19. 11. The figure below shows the state transition diagramof an automaton that accepts bit strings with evennumbers of 1s. The double circle marked with “Even”represents the accepted state. Which of the followingcombinations should be inserted in the blank boxeslabeled A and B ? A B a) 0 0 b) 0 1 c) 1 0 d) 1 1
  • 20. 12. Which of the following representsthe hexadecimal fraction 3A.5C as adecimal fraction? 939 3735 a) b) 16 64 14939 14941 c) 256 d) 256
  • 21. 0.5C16 = 5 x 16-1 + 12 x 16-2 = 16-1 x (5 + 12/16) = 16-1 x (5 + ¾) = 16-1 x 23/4 = 23 / 643A16 = 3 x 16 + 10 = 583A.5C16 = 58 + 23/64 = (58x64 + 23) / 64 = (3,712 + 23) / 64 = 3735/64
  • 22. 13. Which of the following hexadecimal numbers,representing signed 16-bit binary numbers, results inoverflow when multiplied by 4? Here, a negativenumber is represented in 2’s complement. a) 1FFF b) DFFF c) E000 d) FFFF
  • 23. 1FFF0 001 1111 … x 4 = 111 11 … 00DFFF1 101 1111 ...  010 0000 …E0001 110 0000 …  001 1111 …FFFF1 111 1111 …  000 0000 …
  • 24. 14. Which of the following is theappropriate reason why the mantissais normalized in the floating pointrepresentation? a) The arithmetic operation algorithm can be simplified. b) The maximum number of significant digits can be maintained. c) The range of representable values can be expanded. d) The relative size relationships can be investigated as if in fixed point numbers.
  • 25. 15. The function f(x) has a real-type argument and areal-type return value. The procedure using thisfunction is shown in the steps 1 through 5. Whenthis procedure is executed repeatedly a sufficientnumber of times and the value of y stops changingin the step 3, which of the following expressionsholds? [Steps] a) f(a) = y1. x ← a2. y ← f(x) b) f(y) = 03. Display the value of y4. x ← y c) f(y) = a5. Return to the step 2 d) f(y) = y
  • 26. 16. The student scores in a certain examination areshown in the table below. What is the standarddeviation of these student scores? Here, thestandard deviation δ can be defined as follows:“δ” is a positive number, and “n” is the number of sample values. “xi” is each sample value, and “ x” is an arithmetic average of the sample values. Student name Score a) 10 Mr. Brown 30 b) 20 Ms. Rose 50 Mr. White 60 c) 30 70 Ms. Green Mr. Black 90 d) 60
  • 27. Mean = (30+50+60+70+90) / 5 = 60(30-60)2 + (50-60)2 + (60-60)2 + (70-60)2 + (90-60)2 = 302 + 102 + 102 + 302 = (9 + 1 + 1 + 9) x 102 = 20 x 102 Variance = 20 x 102 / 5 = 4 x 102 Standard deviation = square root (400) = 20
  • 28. 17. There are three different sizes of white balls andthree different sizes of green balls. When these sixballs are laid out in a line so that the three white ballscan be placed in adjacent positions, how manyarrangements of all the balls can be made? a) 10 b) 144 c) 576 d) 720
  • 29. No. of ways 3 different white balls can be arranged = 3! = 6No. of ways 3 different green balls plus white group can be arranged = 4! = 24Overall no. of ways = 6 x 24 = 144
  • 30. 18. Which of the following expressions results in a lossof trailing digits when calculated by a computer whosefloating-point representation has a 23-bit mantissa?Here, the numbers in “( )2” are represented in binary. a) (10.101)2×2–16–(1.001)2×2–15 b) (10.101)2×216–(1.001)2×216 c) (1.01)2×218+(1.01)2×2–5 d) (1.001)2×220+(1.1111)2×221
  • 31. 19. There is a device consisting of Unit A, Unit B, andUnit C. Each unit can execute the “exclusive OR”operation in units of 4 bits. When an input bit string1101 is given, an output bit string 0100 is obtained. Inthis device, if the internal key for Unit B is changed andthe output bit string 1111 is generated, which of thefollowing is the newly changed internal key for Unit B? a) 1011 b) 1100 c) 1101 d) 1110
  • 32. 11010001 Key A1100 11000101 Key B 11101001 00101101 Key C 11010100 Output 1111
  • 33. 20. As shown in the truth table below, when an outputsignal is generated using three input signals A, B, andC, which of the following Boolean expressions can beapplied to the output signal? Here, “ ” stands for thelogical product, “ ” for the logical sum, and “ X for the ”logical negation of “X”. Input signal a) Output signal A B C A BC 0 0 0 0 0 0 0 1 1 0 1 1 b) A  ( B  C) c) 0 1 1 1 1 0 0 0 A BC 1 0 1 0 1 1 1 1 0 1 0 0 d) A  ( B  C)
  • 34. Input signal Output signalA B C0 0 0 00 0 1 10 1 0 10 1 1 11 0 0 01 0 1 01 1 0 01 1 1 0 A  ( B  C)
  • 35. 21. A “negative AND” operation “X NANDY” of X andY is defined as “NOT (X AND Y)”. Which of thefollowing is the logical expression that represents “XOR Y” by using NAND only? a) ((X NAND Y) NAND X) NAND Y b) (X NAND X) NAND (Y NAND Y) c) (X NAND Y) NAND (X NAND Y) d) X NAND (Y NAND (X NAND Y))
  • 36. X OR Y = NOT (NOT X AND NOT Y) = NOT X NAND NOT Y = (X NAND X) NAND (Y NAND Y) Input A Output Q 0 1 1 0
  • 37. 22. Which of the following is included as an element of a set of character strings represented by a regular expression “[A–Z]+[0–9]*”? Here, the regular expression follows the rules described below.[A – Z] denotes a single alphabetical letter.[0 – 9] denotes a single numeral. a) 456789The symbol “*” denotes zero or morerepetitions of the immediately preceding b) ABC99*regular expression.The symbol “+” denotes one or more c) ABC+9repetitions of the immediately precedingregular expression. 9 d) ABCDE
  • 38. 23. When the equation “100n–34n=44n” holds, which ofthe following represents 26n? Here, each number iswritten in radix notation; that is, each subscript “n”indicates the radix. In addition, when there is nosubscript, the radix 10 is implied. a) 18 b) 20 c) 22 d) 38
  • 39. 100n – 34n = 44n1xn2 – (3xn + 4) = 4xn + 4n2 -3n -4n -4 -4 = 0n2 – 7n – 8 = 0(n – 8)(n + 1) = 0 n = 8, -1 n=826n = 268 = 2x8 + 6 = 22
  • 40. 24. In the truth table shown below, which of thefollowing is the correct combination of output valuesx1, x2, and x3? Here, “·” stands for the logical product,“+” for the logical sum, “ ” for the⊕exclusive OR, and“ ” for the logical negation of “X”. X Input Output AB C D ( A ⋅ B) + (C ⊕ D) a) 0 0 1 010 1 x1 b) 1 0 0 111 0 x2 c) 1 0 1 110 0 x3 d) 1 1 0
  • 41. 25. Which of the following expressions can be usedto calculate the quarter number (for example, “1” forJanuary through March) for the n-th month of theyear? Here, “n” ranges from “1” for January to “12”for December, and each fractional part of theresulting values is truncated. n −1 a) 3 n −1 b) 3 +1 n c) 3 n d) 3 +1
  • 42. 26. When the resulting value of the expression“13× 3+11 162+9  16 16+3” is represented in binary,how many “1” bits are included in the binary value? a) 6 b) 10 c) 13 d) 16
  • 43. 13x163 + 11 = D00B16162 + 9 = 01091616 + 3 = 001316 D00B16 B = 10112 010916 9 = 10012 001316 3 = 00112 D11B16 1011 D = 11012
  • 44. 27. When the simultaneous equations shownbelow hold for the Boolean variables w, x, y,and z, which of the following is the correctsolution? Here, “+” stands for the logical sumoperation, and “·” for the logical productoperation.x·y = 0 w x y zx·z + w = 1x·y + w = 0 a) 0 0 1 0 b) 0 1 0 0 c) 0 1 0 1 d) 1 1 0 1
  • 45. x·y = 0x·z + w = 1x·y + w = 0  w = 0x·z + w = 1  x·z = 1 x=1,z=1x·y = 0  1·y = 0 y=0
  • 46. 28. There is an 8-bit register where integers arerepresented in binary by using 2’s complement fornegative numbers. When the decimal integer “–24” isstored in the register and then arithmetically shifted 2bits right, what is the resulting value in decimal? Here,the leftmost bit of the register is used as a sign bit. a) -102 b) -96 c) -6 d) 5
  • 47. 256-24 = 232232 = 128 + 64 + 32 + 8 = 111010002111101002111110102000001012 = 5  One’s complement5 + 1 = 6  Two’s complement
  • 48. 29. When a single-bit “half adder” circuit is used for simplyadding two input signals x1 and x2, which of the following isthe appropriate combination of logical expressions for twooutput signals s (sum) and c (carry)? Here, “+” stands forthe logical OR operation and “ ” for the logical AND ⋅operation. s c a) x1 + x2 x1 ⋅ x2 b) x1 ⋅ x2 x1 + x2 c) ( x1 + x2 ) ⋅ ( x1 ⋅ x2 ) x1 ⋅ x2 d) ( x1 + x2 ) + ( x1 ⋅ x2 ) x1 + x2
  • 49. 30. Which of the following prefix expressions isequivalent to the infix expression “(A+B)*C–(D–E)”? a) –*+ABC–DE b) –+AB*C–DE c) AB+C*–DE– d) AB+C*DE––
  • 50. 31. The syntax rules of the field identifier “field ID” arerepresented in BNF notation as shown below. When each IDis defined as an arbitrary sequence of letters and/or digits,which of the following should be inserted into the blank A?<field ID> ::= <ID> | <field ID>.<ID> <ID> ::= A<letter> ::= a|b|с|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z<digit> ::= 0|1|2|3|4|5|6|7|8|9 a) <ID>.<letter>|<ID>.<digit> b) <ID><letter>|<ID><digit>|<ID>.<ID> c) <letter>|<digit>|<ID><letter>|<ID><digit> d) <letter><ID>|<digit><ID>
  • 51. 32. According to a survey of 100 students, there are 40 studentsstudying English, 30 studying French, and 25 studying Spanish.In addition, 8 students are studying English and French, 6 arestudying English and Spanish, 5 are studying French andSpanish, and 22 are not studying any of the three languages.Which of the following is the number of students studying allthree languages? a) 1 b) 2 c) 3 d) 4
  • 52. (40 + 30+ 25) – (8 + 6 + 5) + x = 100 – 22 x = 78 – 95 + 19 = 2
  • 53. 33. When three subsets A, B, and C exist in the universal set Sas shown in the diagram below, which of the followingrepresents the shaded area? Here, each of A, B, and Cindicates the area encompassed by the corresponding circle.stands for the union set of X and Y, for the intersection set of Xand Y, for the relative complement set of Y in X, and for themutually exclusive set of X and Y. a) ( A  B)  ( A  C )  (B  C ) b) (( A  B)  ( A  C)  (B  C))  ( A ⊕ B ⊕ C) c) ( A  B  C ) − ( A ⊕ B ⊕ C ) d) ( A  B  C ) − ( A  B  C )
  • 54. 34. When the true and measured values are 1.744 and 1.720respectively, what is the approximate relative error inpercentage? a) -2.4 b) -1.4 c) 1.4 d) 2.4
  • 55. 1.744 – 1.720 = 0.0240.024 / 1.744 x 100% = 1.4%
  • 56. 35. What is the probability of getting a sum of 8 or 9on a pair of dice, each of which is a regularhexahedron with faces numbered 1 through 6? 1 5 a) b) 18 36 1 1 c) 4 d) 3
  • 57. Sum is 8  6 2, 5 3, 4 4, 3 5, 2 6Sum is 9  6 3, 5 4, 4 5, 3 65 + 4 = 9 combinations9 / (6x6) = 9 / 36 = 1/4
  • 58. 36. An adjacency matrix is used for representing whichvertices of a directed or undirected graph are adjacent towhich other vertices. Which of the following is theappropriate matrix that can represent the directed graphbelow? a) b) c) d) A B C A B C A B C A B C A 1 1 1 A 1 0 1 A 0 1 1 A 0 1 0 B 1 1 1 B 0 1 0 B 1 0 1 B 1 0 1 C 0 0 1 C 1 1 1 C 0 0 1 C 0 0 0
  • 59. (III) When the runtime complexity of an algorithm is representedby n2, which of the following is the running time for the algorithmto process one million elements? Here, n is the number ofelements to be processed by this algorithm, and it takes 1nanosecond to process only one element. a) 1 nanosecond b) 1 millisecond c) 1 second d) 1,000 seconds
  • 60. 37. Which of the following is equivalent to the result of thearithmetic expression “ 7538 − A616 Here, each number is ”?written in radix notation; that is, the radix is represented by asubscript following the number. a) 1010011012 b) 5018 c) 32510 d) 13516
  • 61. (7 x 82 + 5 x 8 + 3) – (10 x 16 + 6)= 8 x (7x8 + 5 – 10 x 2) – 3= 8 x (56 + 5 – 20) – 3= 8 x 41 – 3= 328 – 3= 325
  • 62. 38. Which of the following is equivalent to the logical expression“not ( A ≤ B or C < D Here, A, B, C, and D are variables, and )”?the resulting values of “ A ≤ B ” and “ C < Dcan be either 1 for ”true or 0 for false. a) A< B and C≤D b) A> B and C≥ D c) A< B and C≤D d) A> B and C≥ D
  • 63. 39. Which of the following is a logical equationthat is equivalent to the logic circuit shown below? Here, the “•” is the logical product, “+” is thelogical sum, and is the negation of X. a) Z = ( A + B) + (C ⋅ D) b) Z = ( A + B) + (C ⋅ D) c) Z = ( A ⋅ B) ⋅ (C + D) d) Z = ( A ⋅ B) ⋅ (C + D)
  • 64. 40. An empty tank can be filled with water in 20 minutes byusing Pipe A or in 30 minutes by Pipe B, and the tank filled withwater can be emptied of water in 40 minutes by using Pipe C.When the three pipes A, B, and C work together, approximatelyhow long (in minutes) does it take to fill the empty tank withwater? a) 9.2 b) 10.0 c) 17.1 d) 24.0
  • 65. A: x/20 B: x/30 C: -x/40x/20 + x/30 – x/40 = (6x + 4x – 3x)/120 = 7x/120Fill x in 120/7 = 17.1 minutes
  • 66. 41. Which of the following is the binary fraction that is equivalentto the decimal fraction 115.625? a) 1100111.1001110001 b) 1100111.101 c) 1110011.1001110001 d) 1110011.101
  • 67. 115 = 64 + 32 + 16 + 2 + 1 = 2 6 + 25 + 24 + 2 1 + 2 0 = 111001120.625 x 2 = 1.25 ----- (0.1) 20.25 x 2 = 0.5 -------- (0.10) 20.5 x 2 = 1.0 ----------- (0.101) 2 1110011.1012
  • 68. 42. Which of the following is equivalent to the logical expressionbelow? Here, “AND” has higher precedence than “OR”, and“NOT” has the highest precedence. x AND (y OR z) OR y AND (x OR z) OR x AND y AND z a) x AND y OR x AND z OR y AND z b) x AND y OR x AND z OR y AND z OR x AND (NOT y) c) x AND y OR z OR y AND x OR z OR x AND y AND z d) x AND z OR y AND z OR x AND y AND z
  • 69. 43. How many multiplications at a minimummust be performed in order to calculate thepolynomial expression “x4–2x3+5x2+x–6”? a) 2 b) 3 c) 5 d) 6
  • 70. 44. How many binary numbers can berepresented using a 6-bit number that doesnot have two contiguous 1s? For example,“101010” does not have two contiguous 1s. a) 8 b) 13 c) 21 d) 34
  • 71. 000000 101010 100001100000 010101 101001010000 100100 100101001000 010010 101000000100 001001 010100000010 100010 001010000001 010001 000101
  • 72. 45. When the expression(A – 2 x ( B + C) - D x E) x Fin conventional infix notation is converted to theprefix expression, which of the followingrepresents the resulting expression? a) A2 BC + × − DE × − F × b) A2 BC + × − DE × F − × c) × − − A × 2 × B + CDEF d) × − − A × 2 + BC × DEF
  • 73. 46. When the figure below shows the process flow of acompiler that is used for procedural languages, which ofthe following is the appropriate combination that shouldbe inserted into blanks A though C?   A B C a) Lexical analysis Semantic analysis Syntax analysis b) Lexical analysis Syntax analysis Semantic analysis c) Semantic analysis Syntax analysis Lexical analysis d) Syntax analysis Lexical analysis Semantic analysis