Department of Electrical and Computer Engineering
The University of Texas at Austin
EE 306, Fall 2014
Problem Set 1
Due: September 8th, at the beginning of class
Aater Suleman, Instructor
TAs: Owais Khan, Cagri Eryilmaz and Chirag Sakhuja
Instructions:
You are encouraged to work on the problem set in groups and turn
in one problem set for the entire group. Remember to put all
your names on the solution sheet. Also, remember to put the name
of the TA and the time for the discussion section you would like
the problem set turned back to you. Show your work.
-
Write down all possible 4-bit binary numbers (e.g. 0000,0001,...). Identify the decimal number represented by each 4-bit binary number for
- signed magnitude
- 1's complement
- 2's complement
-
(Adapted from problem 1.5 in the textbook)
Say we had a "black box," which takes two numbers as input and outputs their sum. See Figure 1.7a in the Textbook. Say we had another box capable of multiplying two numbers together. See figure 1.7b. We can connect these boxes together to calculate p * (m + n). See Figure 1.7c. Assume we have an unlimited number of these boxes. Show how to connect them together to calculate:
-
ax+b
-
The average of the four input numbers w, x, y, and z
-
a2 + 2ab + b2 (can you do it with one add box and one multiply box?)
-
a6 (can you do it using only 3 multiply boxes?)
-
(1.14)
Suppose we wish to put a set of names in alphabetical order. We call the act of doing so sorting. One algorithm that can accomplish that is called the bubble sort. We could then program our bubble sort algorithm in C, and compile the C program to execute on an x86 ISA. The x86 ISA can be implemented with an Intel Core microarchitecture. Let us call the sequence "Bubble Sort, C program, x86 ISA, Core microarchitecture" one transformation process.
Assume we have available four sorting algorithms and can program in C, C++, Pascal, Fortran, and COBOL. We have available compilers that can translate from each of theses to either x86 or SPARC, and we have available three different microarchitectures for x86 and three different microarchitectures for SPARC.
-
How many transformation processes are possible?
-
Write three examples of transformation processes.
-
How many transformation processes are possible if instead of three different microarchitectures for x86 and three different microarchitectures for SPARC, there were two for x86 and four for SPARC.
- Convert the following 8-bit 2's complement binary numbers into decimal numbers.
- 01010101
- 10001101
- 10000000
- 11111111