Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

11 Questions in Exam 1 - Computer Organization | COSC 201, Exams of Computer Architecture and Organization

Material Type: Exam; Class: Computer Organization; Subject: Computer Science; University: Colgate University; Term: Unknown 2006;

Typology: Exams

Pre 2010

Uploaded on 08/16/2009

koofers-user-8nr
koofers-user-8nr 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COSC 201: Exam 1 Sept. 28, 2006 Name:
1) Convert the following 16-bit 2’s complement binary number to
decimal:
1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0
2) A) Convert –19 in decimal to 16-bit 2’s complement
2) B) Convert the result from part 2A) to 32-bit 2’s complement.
pf3
pf4
pf5

Partial preview of the text

Download 11 Questions in Exam 1 - Computer Organization | COSC 201 and more Exams Computer Architecture and Organization in PDF only on Docsity!

  1. Convert the following 16-bit 2’s complement binary number to decimal: 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0
  2. A) Convert –19 in decimal to 16-bit 2’s complement
  3. B) Convert the result from part 2A) to 32-bit 2’s complement.
  1. What is the difference between machine language and assembly language?
  2. Suppose you are adding integer values in registers $t0 and $t1 and putting the result in $t2. a) How do you know that overflow has occurred? b) Are there any situations where overflow is not possible?
  1. Assume that the incoming array whose address is stored in $a has a size of 1,000 integers, and that $a1 contains the value
  1. Write to the left of each instruction the number of times that instruction will execute in the worst case.
  1. Assume that all branch and load operations take 2 cycles each, while add, shift, load-immediate and unconditional jump operations take 1 cycle each. How many cycles will this loop require in the worst case, again assuming there are 1, integers in the array?
  1. Given the following IEEE 754 floating point number: 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a) Is this number positive or negative? b) What is the decimal value of the exponent (remember, the bias is 127)? c) Convert the fractional component to decimal. d) Suppose this floating point number is in $t0. What will be in $t2 after the following instructions: li $t1, 64428 slt $t2, $t0, $t
  1. Translate the following assembly language instructions into binary machine language. (Note: For R-type instructions, OPCODE=0. For add, FUNCT=32. For sub, FUNCT=34. For sll, FUNCT=0. For addi, OPCODE=8. Register $t0 corresponds to register 8.) add $t0, $t1, $t sub $t0, $t1, $t sll $t0, $t1, 2 addi $t0, $t1, -