 # EECS 1520 3.0 — Computer Use: Fundamentals

## Winter 2016 Announcements

Lecture Schedule

Course Outline

Homework ## Homework

Important Resources:

## Chapter 4 Homework

### What to Submit

• Cover Page
• Sheet1 worksheet (formula view only) for Exercise 1.1
• Accounts worksheet (formula view only) for Exercise 1.2
• Binary_Conversion worksheet (formula view only) for Exercise 1.3
• Adder worksheet (data view) for Exercise 2
• Adder worksheet (formula view) for Exercise 2

Don't forget to put your name and student number in the header, and worksheet tab name in the footer, of each worksheet in the checklist.

### Discussion, Hints & Tips

Exercise 1.1:

Straight forward, just follow the instructions.

Exercise 1.2:

A name like Smith John is turned into ID JSMITH

Exercise 1.3:

In this exercise you implement a spreadsheet that converts 8-digit (natural) binary numbers to decimal by using the formula found at the bottom of page 35 of the textbook. An 8-digit binary number has the form and the formula is  In the terminology of the exercise, the named range value denotes the powers of 2, the named range bit the binary digits in the number and extension is the product of these two, namely the terms in the formula.

Notice that when you enter a number into input, i.e. cell B2, leading zeros are dropped.  Transforming the input value to Normal form turns the input binary number into a string of exactly 8 zeros and ones including leading zeros.  You can right justify the Normal form so it looks like a number. (Numbers are right justified and text is left justified, by default.)

Take care in how you create the formulas you place in cells C6, C7 and C8.  Using the given named ranges you want to create formulas that can be copied by fill, right across columns C to J.

Exercise 2:

In this Exercise you write Excel formulas to simulate a 4-bit adder. This is equivalent to evaluating the formula at the bottom of page 35 of the textbook for n = 4, where the 4-bit (bit = binary digit) number is Note that this notation is slightly different from the textbook, which uses subscripts 4 through 1, rather than 3 through 0.

In the exercise, two numbers, A and B, are added. Each is a 4-bit two's complement representation. Using the above notation,

A = where , the left-most digit corresponds to single cell named range A3_, etc.

Two things need to be done:

1)   the digits from A and B have to be extracted and placed in A3_, A2_, A1_, A0 and in B3_, B2_, B1_, B0. This is done using the functions LEFT, RIGHT or MID. For example, A3_ is obtained by =LEFT(A,1).  But, this only extracts a character that looks like a number, but is actually just text. To convert it to a number you have to use the function VALUE, so the final formula is

=VALUE(LEFT(A,1)).

2)   On the Adder worksheet you'll find a diagram for the 4-bit adder. Move it aside.  Study the named ranges we have defined, which you can find on the Comments worksheet.  Print out the diagram in the spreadsheet or use Figure 4.5 to label all the gates with these named ranges and the corresponding cell references. Then compare these with the labels in either Figure 4.4 or Figure 4.3.

For example, consider the left-most full adder. This adds the left-most two digits.

Label in           Label in
Fig. 4.4            Fig. 4.5
A                   A3_             (cell E4)
B                    B3_             (cell D4)
XOR1              XOR3           (cell E6)
AND1              AND3           (cell D6)
C                   OR2            (cell F10)
Sum               XOR23          (cell E8)
AND2             AND23          (cell D8)
Carry                OR3            (cell C10)

Now, all you need to do is make the substitutions in the formulas given on page 4-9 below Figure 4.4.

One more issue. The logical functions, AND, OR, NOT accept 0 or 1 as parameters but only produce TRUE/FALSE. To convert these back to 0 or 1, use an IF:

=AND(x,y)              produces a TRUE/FALSE,

but

=IF(AND(x,y),1,0)        produces a 0 or 1 