

Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!


Question 1
Given the integer number 4096, determine the minimum number of bits required to represent it as an unsigned pure binary number.
Question 2
A computer system bus consists of an 8-bit Address Bus and a 32-bit Data Bus. Determine the maximum size of the memory in megabytes (MB) that can be controlled using the mentioned bus.
Question 3
Explain, what is the role of the RAM memory in a microprocessor?
Question 4 (PROGRAMMING) A “magic square” is defined as an arrangement of positive integer numbers placed in a 3x3 square matrix. In such a matrix, the numbers in the same row, in the same column, and in the first and second diagonals, all add up to the same number; this number (the result of the rows/columns/diagonals additions) is called the “magic constant” or “magic sum”. Examples of magic square:
1 8 3 12
Whichever row/column/diagonal sum gives the same result, magic constant = 12
Whichever row/column/diagonal sum gives the same result, magic constant = 111 Write a C program able to analyze an incomplete magic square contained in a file, which name is passed using the command line as the first parameter. Every line in the file contains 3 integer values separated by only one space, the provided file contains an incomplete magic square, i.e., one element is missing, and this value is replaced by -. Assume that the file content is correct, and in addition:
The program shall:
EX. 1 8 1 6
It seems POSSIBILE to try to complete the magic square.
It is NOT POSSIBLE to complete the magic square. Magic constant = 15.
8 1 6 3 5 7
4 9 2
It seems POSSIBILE to try to complete the magic square. Magic constant = 110. IMPOSIBLE to complete the magic square.