CSCI 162 Spring 2017: Assignment 1: Boolean Circuits and Binary Representation

Submission deadline: 1:30 pm, Tuesday Jan 31, 2017. (Between 1 and 1:30 I will be in my office to receive submissions; at 1:30 I will be in the lab and will recieve submissions for the first 5 minutes.)

Assignment submission:

Problems should be neatly presented on paper. Hand in, or place under my door.

Questions: This page contains both homework questions, which the student should use to practice, and Assignment questions, which the students should hand in. Practice questions can be taken up in class. Students may discuss Assignment Questions, and may be informed by such discussions, but when a student writes the submitted work the student must do so without the aid of any relic of any conversation, communication, or outside source that gives directly the solution or partial solution to the problem, unless explicitly permitted by the Assignment document.

  1. (5 marks Assigned) Draw the digital circuit that expresses the boolean formula f(x,y,z)=((x+y'z)(y+x'z'))'
  2. (5 marks Assigned) Give the truth table for the formula in Question 1.
  3. (5 marks Assigned) In class, we proved using a truth table that y + y'z = y + z. Prove the same using the Boolean Algebra theorems given in class.
  4. (Homework) Build a two-bit Adder, based on the half-adder given in class. It will have four inputs, x1 x0 and y1 y0, where x0 and y0 are the least significant digits of x and y, respectively. There are three outputs, z2 z1 and z0.
  5. (10 marks Assigned) For the Digital Display unit as given in class, give the Karnaugh Map (including showing the blocks for "and" gates in a minimum-input circuit) for the left-bottom-vertical display bar. Show the "don't care" values as X in the map. Give the boolean formula and the circuit diagram for the result. Report how many inputs are in your circuit. All literals are present "for free" -- i.e., negated inputs are available without requiring NOT gates.
  6. (2 marks Assigned and Homework) Convert each of the following binary representations to its equivalent base 10 form: The final two will be graded.

    101010
    100001
    10111
    0110 (assigned)
    11111 (assigned)
  7. (2 marks) Convert each of the following base 10 representations to its equivalent binary form: The final two will be graded.

    32
    64
    96
    15 (assigned)
    27 (assigned)
  8. (2 marks) Convert each of the following binary representations to its equivalent base 10 form: The final two will be graded.

    11.01
    101.111
    10.1
    110.011 (assigned)
    0.101 (assigned)
  9. (2 marks) Express the following values in binary notation: The final two will be graded.
    412
    234
    118
    516 (assigned)
    558 (assigned)
  10. (2 marks) Perform the following additions in binary notation: The middle two will be graded.

    11011+1100
    1010.001+1.101 (assigned)
    11111+0001 (assigned)
    111.11+00.01
    (Brookshear 45-46) Brookshear, Glenn, Dennis Brylow. Computer Science: An Overview, 12th Edition. Pearson, 20140618. VitalBook file.
  11. (2 marks Assigned) Given the following:
    11011+11001
    the answer, and the interpretation of what the question is, will be different depending on whether binary or twos-complement representation is assumed. Report the decimal notation equivalent of the question, and the answer, of the sum under assumption of binary representation, and of twos-complement representation.
  12. (5 marks Assigned) Write a MARIE assembler program that takes as input three integers and outputs the value of the largest. Test it on the MARIE simulator. Report three such test cases you have executed on the simulator that test different conditionals. Report the answer found in each such case.