Sale!

# Assignment 1 Number Representation and Boolean Algebra

\$30.00

Category:

## Description

Rate this product

School of Computer Science

1 Number Representation and Boolean Algebra
hand, or to typeset them using a software package as long as they are written clearly
and legibly. For typeset answers, don’t use a font size less than 10pt. Note that you
• If you have handwritten answers, scan them, and save the corresponding files into
PDF or MS-Word formats into the answer-folder.
final answers, and b) detailed answers (scanned papers, or typeset files) that show
the steps you used to solve different parts of this question.
1.1 Number Representation (24 marks)
Convert the numbers below from the source base (left) to the destination base (right). Then
Q1.1.1) (741)10 ! (?)2
Q1.1.2) (741)10 ! (?)16
Q1.1.3) (1.3515625)10 ! (?)2
Q1.1.4) (1.3515625)10 ! (?)16
Q1.1.5) (1001101)2 ! (?)10
Q1.1.6) (1001101)2 ! (?)16
Q1.1.7) (0.101011)2 ! (?)10
Q1.1.8) (0.101011)2 ! (?)16
1
Q1.1.9) (F00D)16 ! (?)2
Q1.1.10) (F00D)16 ! (?)10
Q1.1.11) (A.BED)16 ! (?)2
Q1.1.12) (A.BED)16 ! (?)10
1.2 Floating Point Number Representation (16 marks)
Q1.2.1) Represent 1.00001 as an IEEE single precision floating point number in binary
Q1.2.2) Represent -0.32750702 as an IEEE single precision floating point number in binary
Whereas we haven’t covered IEEE floating point number representation in class but I
am going to provide an example in myCourses to show you how that works. You can then
do a little bit of research on your own. Don’t forget to show all your steps for this question.
2 Design of a 4-bit Adder-Subtractor (40 marks)
You should design your circuit in the provided template circuit file (F our_Bits_Add_Sub.circ).
This file is located in answer-folder and you can open it with Logisim-evolution software.
2.1 Introduction
In class we saw a circuit diagram for a 1-bit full adder. In this assignment you will build
a simple 4-bit adder-subtractor that supports two different functions (addition and subtraction). You must build your circuit in Logisim-Evolution using only the basic gates
provided in the built-in library, specifically, AND, OR, NOT, XOR, and XNOR. You may
set the properties of these gates such as changing the logical states of the inputs (e.g.
negating them), the number of inputs, etc.
must implement your solution in that starter project by following rules that are mentioned
below. You will also need to use wiring such as splitters to organize your implementation.
To complete the objectives of this assignment, you must organize your solution into subcircuits using the names and labels specified below (leave the main circuit empty).
• You will need to also edit the appearances of some sub-circuits to better organize
your solution. But, be careful not to change the sub-circuits’ names, and
input/output labels in the starter project!
• You are free to create additional sub-circuits with custom appearances as you see fit
and then use them in the starter sub-circuits. The sub-circuits for the main objectives,
and in some cases the inputs and outputs, are already set up for you in the starter
2
logisim-evolution project file called “F our_Bits_Add_Sub.circ”. Make sure that you
are filling the starter project and its corresponding sub-circuits with correct designs,
i.e., do not depart from the structure we have provided.
2.2 Warm up (10 points):
Implement a one-bit full adder in the “Add_1Bit” sub-circuit that takes A, B and Cin
as single-bit inputs and produces the Sum and carry-out Cout functions. Note that the
sub-circuit appearance was created for you in the starter code. The text labels in the are
shortened forms of the input and output names defined in the circuit layout. Specifically,
Sum is labeled with S for short.
2.3 Build a 4-bit adder/subtractor (30 points):
To do so you must fill in the starter sub-circuit (“Add_Sub_4Bits”) with proper circuitry
as detailed below:
file. Now, implement a 4-bit adder-subtractor in “Add_Sub_4Bits” by using four instances
of “Add_1Bit” and complementary circuitry. (20 points)
There is a control input signal, “Add_Sub”. Whenever it is asserted to ’1’, this circuit
circuit should perform 4-bit subtraction (A-B) by using 2’s complement methodology. For
both cases your circuit should show the correct result on the output “R”. Note that inputs
(A, B) are represented as two unsigned 4-bit numbers. Your implementation should be able
to detect an overflow, if one occurs, and also to detect if the result of an operation has a
value of zero (the template file provides two appropriate outputs).
3 WHAT TO HAND IN FOR THIS ASSIGNMENT
Everything should be handed in electronically on myCourses. Each student is to submit
his or her own unique solution to these questions.