2. a) What is the difference between Computer organization and computer architecture ? [2 marks] a) Computer organization addresses issues such as control signals (how the computer is controlled), signaling methods, and memory types. It encompasses all physical aspects of computer systems. computer architecture, on the other hand, focuses on the structure and behavior of the computer system and refers to the logical aspects of system implementation as seen by the programmer. b) How many kilobytes (KB) are in 1 Megabyte (MB)? [2 marks] 1 MB = 2^20 1 KB = 2^10 1 MB contains 1000 KB 3. Convert the following unsigned binary numbers to decimal numbers: (two marks) a) 11100100 [2 marks] a) 11100100 0*2^0=0 0*2^1=0 1*2^2=4 0*2^3=0 0*2^4=0 1*2^5=32 1*2^6=64 1*2^7=128 4+32+64+128 = 228 b) 11000110 [2 marks] b) 11000110 0*2^0=0 1*2^1=2 1*2^2=4 0*2^3=0 0*2^4=0 0*2^5=0 1*2^6=64 1*2^7=128 2+4+64+128 = 198 4. Given the 8-bit binary number: 11111110 What decimal number does this represent if the computer uses? a. signed-magnitude representation [ 2 marks] b. c. d. e. f. g. h. i. j. k. l. ) signed-magnitude representation 11111110 0*2^0=0 1*2^1=2 1*2^2=4 1*2^3=8 1*2^4=16 1*2^5=32 1*2^6=64 2+4+8+16+32+64 = 126 Ans : -126 b. signed-1's complement [ 2 marks] b) signed-1's complement 11111110 0000001 = 1 Ans :-1 c. signed-2's complement [ 2 marks] c) signed-2's complement Ans : -2 1. Part a: Calculate the bias of the 14-bit floating-point model.[5 marks] a) 14-bit floating point model means you have one bit for the sign , 5 bits for the exponent and 8 bits for significant. Let’s say that we wish to store the decimal number 17 in our model. 17 = 17.0 x 10^0 = 1.7 x 10^1 = 0.17 x 10^2. Analogously, in binary, 17'10 = 10001'2 x 2^0 = 1000.1'2 x 2^1 = 100.01'2 x 2^2 = 10.001'2 x 2^3 = 1.0001'2 x 2^4= 0.10001'2 x 2^5. Our fractional part will be 10001000 and our exponent will be 00101 :: 01000110000000 Part b: What are the components necessary to build a computing system : [2 marks] b) To build a computing system. At the most basic level, a computer is adevice consisting of three pieces: 1. A processor to interpret and execute programs 2. A memory to store both data and programs 3. A mechanism for transferring data to and from the outside world Part c: Express 0.03125 excess 16 bias. [3 marks] c) 0.0312510 = 0.000012 X 2^0 = 0.0001 X 2^-1 = 0.001X 2^-2 = 0.01 X 2^3=0.1X2^-4. Applying the bias, the exponent field is 16 - 4 = 12. |0 | 0 1 1 0 0 | 1 0 0 0 0 0 0 0 | 2. Assuming 2’s complement signed 8-bit representation, consider the following: +70 = 01000110 +80 = 01010000 10010110 Is the answer correct? Do we have overflow? Explain. [ 5 marks] 2 | 2) No , we have an overflow and that is because two positive numbers are added but the result is negative. 3. Why are Binary and decimal called positional systems ? [2 marks] 3) Bytes store numbers using the position of each bit to represent a power of 2. *The binary system is also called the base-2 system. *Our decimal system is the base-10 system. It uses powers of 10 for each position in a number. *Any integer quantity can be represented exactly using any base (or radix). When the radix of a number is something other than 10, the base is denoted by a subscript. 4. Represent the following decimal numbers in binary using 8 bits signed magnitude one’s complement and two’s complement: a. 77 [1.5 marks] 4) a) 77 Signed magnitude: 01001101 One's complement: 01001101 Two's complement: 01001101 b. -42 [1.5 marks] b) -42 Signed magnitude: 10101010 One's complement: 11010101 Two's complement: 11010110 Problem 1 : [ 10 Marks] 1. Why it is important for Boolean expressions to be minimized in the design of digital circuits? what is the basic element of a sequential circuit? . [ 4 marks] 1) Digital computers contain circuits that implement Boolean functions. The simpler that we can make a Boolean function, the smaller the circuit that will result.Simpler circuits are cheaper to build, consume less power, and run faster than complex circuits.With this in mind, we always want to reduce our Boolean functions to their simplest form.A sequential circuit has one flip-flop; two inputs X and Y; and one output, S. It consists of a full-adder circuit connected to a JK flip-flop, 2. Name four basic logic gates along with a brief description of the basic construction of logic chip [ 3 marks] 2) AND Gate: The AND gate is a digital logic gate that implements logical conjunction - it behaves according to the truth table to the right. A HIGH output (1) results only if both the inputs to the AND gate are HIGH (1). OR gate: A Logic OR Gate or Inclusive-OR gate is a type of digital logic gate that has an output which is normally at logic level "0" and only goes "HIGH" to a logic level "1" when ANY of its inputs are at logic level "1". The output of a Logic OR Gate only returns "LOW" again when ALL of its inputs are at a logic level "0". XOR: The output of the XOR gate is a 1 if either but not both inputs are 1 and a 0 if the inputs are both 0 or both 1. NOT gate : The NOT gate is also known as an inverter, simply because it changes the input to its opposite (inverts it). The NOT gate accepts only one input and the output is the opposite of the input. In other words, a lowvoltage input (0) is converted to a high-voltage output (1). 3. Which flip- flop gives a true representation of computer memory ? [ 3 marks] 3) SR flip-flop is the D (data) flip-flop. A D flip-flop is a true representation of physical computer memory. This sequential circuit stores one bit of information. If a 1 is asserted on the input line D, and the clock is pulsed, the output line Q becomes a 1. If a 0 is asserted on the input line and the clock is pulsed, the output becomes 0. Remember that output Q represents the current state of the circuit. Therefore, an output value of 1 means the circuit is currently "storing" a value of 1. Problem 2 : [ 10 Marks] a) Using the DeMorgan ‘s law , write an expression for the complement of F if F(w,x,y,z) = xyz'(y'z+x) '+(w'yz’+z’x') a) F(w,x,y,z) = xyz'(y'z+x) '+(w'yz’+z’x') F'(w,x,y,z)= (xyz'+(y'z+x)'+(w'yz'+z'x'))' = (xyz')'+((y'z+x)')'+(w'yz+z'x'))' = (xyz')'+((y'z+x)(w'yz)'z''x'' = x'+y'+z+((y'z+x)(w+y'z')zx b) 1) Use the Boolean identities to prove the Absorption Laws. [ 3 marks] Absorption law says that x(x +y) = x b) 1) x(x + y) = x = x + xy Idempotent = x(1 + y) Distributive = x(1) Null = x Identity x + xy = x(1 + y)1 Distributive = x(1) Null = x Identity 2) Using the basic identities of Boolean algebra show that : [2 marks] xy+x’z+yz=xy+x’z 2) xy + x'z + yz = xy + x'z + (1)yz = xy + x'z + (x + x')yz = xy + x'z + xyz + x'yz = (xy + xyz) + (x'z + x'yz) = xy(1 + z)+x'z(1 + y) = xy + x'z c) Using DeMorgan's Law, write an expression for the complement of F: [ 3 marks] x’y’ + x'z [2 marks]. c) [xy′+ x′y]′ = ( xy′)′ + (x′y)′ = (x′+y).(x+y′) = xx′ + yy′ Problem 4: [ 20 marks] 1. Where are registers located and what are different types? [ 3 marks] 1) Registers are storage locations within the CPU. There are seven registers: •AC: The accumulator, which holds data values. •MAR: Memory address register, which holds the memory address of the data being referenced. •MBR: Memory buffer register, which holds either the data just read from memory or the data ready to be written to memory. •PC: The program counter, which holds the address of the next instruction to be executed in the program. •IR: The instruction register, which holds the next instruction to be executed. •InREG: The input register, which holds data from the input device. •OutREG: The output register, which holds data for the output device. 2. How many bits are required to address a 2Mx32 memory if : a. The memory is byte addressable . [ 2 marks] a. There are 2M x 4 bytes which equals 2 x 2^20 x 2^2 = 2^23 total bytes, so 23 bits are needed for an address. b. The memory is word addressable. [ 2 marks]. b. There are 2M words which equals 2 x 2^20 = 2^21, so 21 bits are required for an address. 3. Draw the combinational logic for signal control of MARIE’s load instruction using 4.18 as an example . [ 2 marks] 4. Write the following code segment in MARIE’S assembly language : a. If x > 1 then Y = X + X; X = 0; End if ; Y = Y +1; [5 marks ] a) If, 100 Load X /Load X 101 Subt One /Subtract 1, store result in AC 102 Skipcond 800 /If AC > 0(X > 1),skip the next instruction 103 Jump Endif /Jump to Endif if X is not greater than 1 Then, 104 Load X /Reload X so it can be doubled 105 Add X /Double X 106 Store Y /Y= X + X 107 Clear /Move 0 into AC 108 Store X /Set X to 0 Endif, 109 Load Y /Load Y into AC 10A Add One /Add 1 to Y 10B Store Y /Y = Y + 1 10C Halt /Terminate program X, 10D Dec ? /X has starting value Y, 10E Dec ? /Y has starting value One, 110 Dec 1 /Use as a constant b. X=1; While x<10 do X=x+1; End while; [5 marks] b) Load One Store X /Initialize X Loop, Load X /Load loop constant Subt Ten /Compare X to 10 SkipCond 000 /If AC > 0 (X is less than 10), continue loop Jump Endloop /If X is not less than 10, terminate loop Load X /Begin body of loop Add One /Add 1 to X Store X /Store new value in X Jump Loop /Continue loop Endloop, Halt /Terminate program X, Dec 0 /Storage for X One, Dec 1 /The constant value 1 Ten, Dec 10 /The loop constant . و ان شاء هللا يكون االختبار حلو و سهل. اتمنى لكم التوفيق من اعماق قلبي )ان شاء هللا الكل فل مارك ( فقط تفائلوا خيرا تجدوه دعاوتكم هو غاية ما ارجوكم به . محبة االقصى:اختكم
© Copyright 2026 Paperzz