所屬科目:研究所、轉學考(插大)、學士後-計算機概論
1. (10%) Please draw digital gate diagrams for AND, OR, and XOR operator.Moreover, please show the truth tables for the above three operators.
2. (10%) Write C/C++ or Java code to sort the following array in descending ordersuch that array[5] = {5,4,3,2,1}.int array[5] = {5,2,1,4,3};
3. (10%) Convert decimal number 101 and -98 into binary.
4. (10%) What is the binary representation of each of the following hexadecimalnumbers?a. F9D4
b. 6ACD
5. (10%) When we declare a variable and a function as private in a class, pleasedescribe how to change the value of the variable and how to access the function.
6. (10%) What is the output n marked by (a) and (b) of the following C++ program?int n=6; int f1(int k) int f2(int *p)f1(n) ; {… {…cout << n ; //(a) k += 6; *p += 6;f2(&n) ; } }cout << n ; //(b)
7. (10%) What is the value of n in each of the following equations?a. GB = 10n bytesb. MB = 10n bytesc. TB = 10n bytes
8. (10%) When we execute 63+65 in signed binary with 8 bits, what is the result?Does the overflow occur? Please describe what the overflow is.
9. (10%) What is the result after the following code executes?Printf(“%d”, 19/2);Printf(“%6.2f”, 17.2);
10. (10%) What is the OSI (Open System Interconnection) reference model? Pleaselist the OSI 7 levels.