UNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2011/12 Semester Three DUMMY PAPER Module Code: COM181 CRN: 54867 Module Title: COMPUTER HARDWARE Time allowed: 3 Hours Use of Dictionaries: Dictionaries are not permitted Examination Aids: Data Sheets on the MIPS processor will be provided. Instructions to Candidates: Candidates should read this section carefully before commencement of the examination. Answer ALL questions Please note that not all questions have the same marks Students are advised to write their registration number and desk number only on any attachment, eg graph paper, or any other documentation being submitted with their examination script book(s). Module Co-Ordinator: Mr Ian McCrum, Room 5B18, Ext 66364 or 66372 (school office) 1/3 SECTION A Q.A1 Please show all details of your working when answering the questions below a. Convert 194210 to a 16 bit binary number and to a 4 digit hex number.. b. Convert 1008 to a 16 bit binary number and also to its two’s complement representation. c. Subtract 1008 from 1942 by adding the two’s complement of 1008 in binary to 1942. (marks) Q.A2 Please show all details of your working when answering the questions below a. Express 0100 0010 1011 1010 1101 1101 1010 1101two as eight hex digits. b. What decimal number does it represent assuming it is an unsigned integer. c. Convert the number above to its negative representation by taking its two’s complement. (marks) Q.A3 Please show all details of your working when answering the questions below Number (a) is 00111001 and number (b) is 01000111 a. What is the result of logically ORing number (a) with number (b)?. b. What is the result of logically ANDing number (a) with number (b)? c. What 8 bit binary number would you use to RESET bits 5 and bits 0 of number (a) and what logical operation would you use? d. What 8 bit binary number would you use to SET bits 7 and bits 4 of number (a) and what logical operation would you use? (marks) 2/3 Q.A4 Please refer to the MIPs instruction set is documented in the datasheets given to you along with the question paper when answering the following questions. a. Present a diagram showing the format of instructions of type R clearly identifying and describing each of the fields within the 32 bit word. b. The symbol $zero represents register zero, $t0 represents register 9 and $s4 represents actual register address 20 (in decimal). Give the 32 bit binary instruction code for ADD $s4,$t0,$zero c. What assembler instruction is presented by the 32 bit binary machine code instruction 0011 0010 1000 1001 0000 0000 0100 0010 d. Describe the operation of this instruction in words (marks) END OF PAPER 3/3