UNIVERSITY AT BUFFALO, THE STATE UNIVERSITY OF NEW YORK
The Department of Computer Science & Engineering
cse@buffalo
CSE 111: Great Ideas in Computer Science

Homework 4

12 points
Due Monday July 18, 2011

For all problems involving math, please show your work. I won't be able to give you credit otherwise.

  1. Add 96 and 127 in binary. [3pts]
  2. Subtract 12 from -24 using the 2's compliment method. [3pts]
  3. Subtract 47 from 30 using the 2's compliment method. [3pts]
  4. In digital electronics, a flip-flop (or latch) is a circuit used to store state (it's a memory circuit!). One type of latch is the RS latch. Without looking up the answer, describe how it works:

The best way to approach this problem is probably to create a truth table to determine what Q is equal to when R and S are set to each of their possible values. S is short for set and R is short for reset (which may help you figure it out!). For that reason, this is also known as a Set-Reset latch. [3pts]


Copyright © 2011 Daniel R. Schlegel.