Homework Assignment 4 -- CS429 Fall 2013

Due Date: 25 Sept 2013

  1. Consider the ADD instruction. Suppose we want to add two numbers, in memory at 0x1004 and 0x4777C, together and store the result in a different memory location (0x45640). Rough out how you would do that in

    1. a 1-address machine

    2. a 2-address machine

    3. a 3-address machine

  2. How does the computer know where the next instruction to execute is located? How does this change?

  3. For the following words, if they are stored in memory with the given parity bit,
    0x25626567   parity bit = 1
    0x34340030   parity bit = 0
    0xA2A2A2A2   parity bit = 0
    0x6C6F6261   parity bit = 1
    1. Which of them have parity errors (for odd parity)?
    2. Is there an efficient way to compute parity for a hexidecimal number, instead of converting it to binary and counting the one bits?
    3. If I didn't tell you even or odd parity, could you tell which have parity errors?