Project 1:
Translating into Arrays of Bits and Implementing Operations
Due:____________________

 

 

 

You will write a program in the language of your choice (C++ or Java) with a function or procedure that takes a number between -127 and 127 and translates it into 8 bytes that were either 1 or 0.  These 8 bytes represent the number in 2's complement.  You should also have a function that can take an array of bytes and output it.  You should also write a function or procedure that takes such an array and multiplies it by your number if it fits.  Your function must do the multiplication without translating the bytes into an integer or floating point number.  Your program should take in a number from the user and output the bytes and the bytes from the multiplied number.

The multiplication number is assigned this way:

Number

First letter of last name

3

5

6

9

10

12

A-C

D-G

H-L

M-Q

R-T

U-Z

 

 

Project 2
Designing Circuits
Due:______________________

           

 

 

 

Design a circuit to take the bits from project 1 and do project 1.  Your circuit should consist of logic gates and wires.  The circuit will take 6 bits representing a 2’s complement number in 6 input wires and have 10 output wires for the product.