You are on page 1of 1

Computer Structures - Universidad Carlos III de Madrid Flix Garca Carballeira, Alejandro Caldern Mateos, Jos Daniel Garca

Snchez

Unit 1. Introduction Exercises


Exercise 1. Convert to hexadecimal the following number of 16 bits: 1101001011101010 Exercise 2. Convert to binary the following number: F73AB591 Exercise 3. Given a computer with the following features: o o o o Size of a memory location: 16 bits Instruction size: 16 bits Operation code: 3 bits Number of registers: 4 (2 bits) o R0 (00) o R1 (01) o R2 (10) o R3 (11)

Instruction 000010010XXXXXXX

Description Adds the register 00 and 10, and it stores the result in 01

0010100000000101 0100100000001001 0110100000001001

It stores in register 01 the value 00000000101 It stores in register 01 the value stored in the memory address 00000001001 It stores in the memory address 00000001001 the content of the register 01 Branch to the instruction stored in position 0000000001001

1000000000001001

1010100000001001

If the content of register 01 is equal to the content of register 00, the next instruction to be executed is the stored in the Memory address 000001001

Exercise 4. Using the previous machine instructions, write a program to compute 1 + 2 +3 + 4 + 10.

You might also like