# Spring 2001 CSCI 255 Homework 4

You must show your work to receive full credit.
This assignment is due Wednesday, 21 February.

## Problem 1

Assume `x` is a C integer variable.
Show how you would set bits 5, 7, and 9 of `x` to 1
and clear bits 11 and 13 to 0 in one C-statment.

## Problem 2

Take the R-S latch in Figure 3.17 (p. 61) and replace
the two NAND gates with two NOR gates.
Show that the modified
latch is stable if `S`, `R`, and `a` are
all 0 while `b` is 1.

Now raise `R` to 1.
What happens to your modified latch?

Finally lower `R` back to 0.
Again, what happens to your modified latch?

## Problem 3

Decode the following LC/2 binary instructions,
specified as hexadecimal numbers.
That is, determine the type (opcode) of each instruction and
specify its fields:

`0000`
`0246`
`1545`
`1FFF`
`4444`
`6666`
`8000`
`99BF`
`BBBB`
`F035`