CS 2734 Computer Organization II


Laboratory 2 [1/25/99; 1/27/99] Binary Arithmetic


Laboratory 2 is an introduction to binary arithmetic and representations of signed numbers. Both sessions meet in the classroom. The lab TA, VJ Gali, will talk about binary, octal, decimal, and hexadecimal numbers, and conversions between the various forms

Schedule for Session 1 (1/25/99): Mostly a lecture by VJ.

Schedule for Session 2 (1/27/99): VJ may give a quiz over number bases and conversions. Here are some sample problems of the type you will be expected to learn in the lab.

  1. Convert 189 to:
    a) An unsigned binary number
    b) A 16-bit two's complement number

  2. Convert -189 to:
    a) A 16-bit two's complement number

  3. Convert binary number 10011111001 to:
    a) octal
    b) hexadecimal
    c) decimal

  4. Perform the following binary addition:
    10000111 + 10111011

  5. Convert the hexadecimal number AB32 to:
    a) binary
    b) octal
    c) decimal


The answers are:

  1. a) 10111101
    b) 0000000010111101
  2. b) 1111111101000011
  3. a) 2371
    b) 4F9
    c) 1273
  4. 101000010
  5. a) 1010 1011 0011 0010
    b) 125462
    c) 43,826


Revision Date: 1/21/99