所屬科目:研究所、轉學考(插大)、學士後-計算機概論
1. If \( a \cdot 4^5 + b \cdot 4^4 + c \cdot 4^3 + d \cdot 4^2 + e \cdot 4^1 + f \cdot 4^0 = 1500 \), then \( a + b + c + d + e + f = ? \) (15%)
2. Design a circuit using AND, OR, and NOT gates to implement the following truth table. (20%)
3. Consider the following definition of a character array in C. char array[40][30]; If the first element of the array is stored at memory address (2000)16, what will be the address (in hexadecimal) of the element array[21][18]? (15%)
4. What will be the output of the following C program? (15%)
5. Write a C function named div that receives an integer parameter n and prints all integers from 1 to n that are neither divisible by 5 nor by 7. (20%)
6. Suppose that you are given an 8-bit data stored in a variable named x. Bit 0 is the least significant bit in x while bit 7 is the most significant bit. Write a logic expression that applies one or more AND, OR, NOT, or XOR operator with other operands to invert bits 0, 2, 4, 6 of x and reset bits 1 and 3 of x to 0. You may add parentheses if needed. (15%)