Write the boolean function as boolean algebra

Assignment Help Computer Engineering
Reference no: EM131453634

1 Boolean Algebra and Logisim Task

The following truth table describes a Boolean function with four input values X1, X2, X3, X4 and two output values Z1, Z2.

Input

Output

X1

X2

X3

X4

Z1

Z2

0

0

0

0

0

1

0

0

0

1

0

0

0

0

1

0

0

0

0

0

1

1

1

1

0

1

0

0

0

0

0

1

0

1

1

0

0

1

1

0

1

0

0

1

1

1

1

0

1

0

0

0

0

1

1

0

0

1

1

0

1

0

1

0

1

1

1

0

1

1

1

1

1

1

0

0

1

1

1

1

0

1

0

1

1

1

1

0

1

1

1

1

1

1

1

0

The main result of this task will be a logical circuit correctly implementing this Boolean function in the logisim simulator. Each step as defined in the following sub-tasks needs to be documented and explained.

Step 1: Boolean Algebra Expressions
Write the Boolean function as Boolean algebra terms. First, think about how to deal with the two outputs. Then, describe each single row in terms of Boolean algebra. Finally, combine the terms for single rows into larger terms. Briefly explain these steps for your particular truth table.

Step 2: Logical circuit in Logisim
Model the resulting Boolean terms from Step 1 in a single Logisim circuit, using the basic gates AND, OR, NOT. You can use gates with more than two inputs.
Explain what you did for each step.
Test your circuit using values from the truth table and document the tests.

Step 3: Optimized circuit
The goal of this task is to find a minimal circuit using only AND, OR, and NOT gates. Based on the truth table and Boolean algebra terms from Step 1, optimize the function using Karnaugh maps.
You will need to create two Karnaugh maps, one for each output. Your documentation should show the maps as well as the groups found in the maps and how they relate to terms in the optimized Boolean function.
Then use Logisim to create a minimal circuit. Dont use any other gates than AND, OR, and NOT. Test your optimized circuit using values from the truth table.

A MARIE calculator

In this task you will develop a MARIE calculator application. We will break it down into small steps for you.

Most of the tasks require you to write code, test cases and some small analysis. The code must contain comments, and you submit it as .mas and .mex files together with the rest of your assignment. The test cases should also be working, self-contained MARIE assembly files. The analysis needs to be submitted as part of the main PDF file you submit for this assignment.

Note that all tasks below only need to work for positive numbers. If you want a challenge, you can try and make your calculator work for negative numbers, but it's not required to get full marks.

In-class interviews: You will be required to demonstrate your code to your tutor after the submission deadline. Failure to demonstrate will lead to zero marks being awarded to the entire programming part of this assignment.

MARIE integer multiplication and division

Multiplication

Implement a subroutine for multiplication, call it Multiply (based on the multiplication code you wrote in the labs - you can use the sample solution as a guideline). Test your subroutine by writing a test program that calls the subroutine with different arguments, and then step through the program in the MARIE simulator.
You need to submit a MARIE file (.mas and .mex) that contains the subroutine and a test case, (call it "2.1.1 Multiply")

Power
The power operation is defined as repeated multiplication of the same factor. For exam- ple, 9 power 2 is 9 × 9 = 81, and 3 power 5 is 3 × 3 × 3 × 3 × 3 = 243. More generally, we have X power Y, where X is called the base, and Y is called the exponent. Exponent corresponds to the number of times the base is used as a factor. The basic idea of com- puting the power is to repeatedly call the Multiply subroutine, which was implemented in the previous task. Your task is to implement a subroutine for power (call it Power). Test your subroutine by writing a test program that calls the subroutine with different arguments, and then step through the programs in the MARIE simulator.

You need to submit a MARIE file (.mas and .mex) that contains the subroutine and a test case, (call it "2.1.2 Power")

A stack in MARIE assembly

1. Write a sequence of instructions that pushes your full name in a reverse order onto the stack and then pops it again, printing each character using the Output instruction (your full name should be printed in the right order). Step through your code to make sure that the StackPointer is incremented and decremented correctly, and that the values end up in the right memory locations. The name should be hardcoded (without input instruction).

2. Write a program that implements Push and Pop subroutines. Test the subroutines by pushing and popping a few values using the input instruction, stepping through the code to make sure the stack works as expected. The program should accept any number of characters to be pushed, it will be poped only when you hit the backslash key.

A simple RPN calculator

We will now implement a simple RPN calculator that can only perform a single operation: addition.
We will use the Input instruction to let the user input a sequence of numbers and operators. To simplify the implementation, we will switch MARIE's input field to Dec mode, meaning that we can directly type in decimal numbers. But how can we input operators?

We will simply only allow positive numbers as input values, and use negative num- bers as operators. For this first version, we will use -1 to mean addition.

So to compute 10 + (20 + 30) we would have to enter 10 20 30 - 1 - 1. Of course we could also enter 10 20 - 1 30 - 1 (which would correspond to (10 + 20) + 30). The pseudo code for this simple calculator could look like this:

Loop forever:
AC = Input // read user input
if AC >= 0: // normal number? push AC
else if AC == -1: // code for addition?
X = Pop Y = Pop
Result = X+Y
Output Result // output intermediate result AND
Push Result // push onto stack for further calculations

Note that your calculator doesn't need to do any error checking, e.g. if you only enter a single number and then use the addition operator, or if you enter any negative number other than -1.
Implement this calculator in MARIE assembly. Use the Push and Pop subroutines from the previous task to implement the stack. It is a requirement that your calculator can handle any valid RPN expression, no matter how many operands and operators, and no matter in what order (up to the size of the available memory). I.e., the following expressions should all work and deliver the same result:
10 20 30 40 50 -1 -1 -1 -1
10 20 -1 30 40 -1 50 -1 -1
10 20 30 -1 -1 40 -1 50 -1
10 20 -1 30 -1 40 -1 50 -1
Document a set of test cases and the outputs they produce.

More RPN operations

Of course the previous calculator is quite useless - if there is only one operation, we don't need to use RPN at all. Therefore, the next step is to extend your calculator with support for additional operations:

 Addition (code -1)
 Multiplication (code -2)
 Power (code -3)
 Square, i.e., compute x2 for a value x (code -4) The extended pseudo code would look like this:
Loop forever:
AC = Input // read user input
if AC >= 0: // normal number? push AC
else if AC == -1: // code for addition?
X = Pop Y = Pop
Result = X+Y Output Result Push Result
else if AC == -2: // code for multiplication?
X = Pop Y = Pop
Result = X*Y Output Result Push Result
else if ... // remaining cases follow the same structure
Note that by convention, XY + means X+Y in RPN, and similarly XY × means X×Y .
As above, test your calculator using different test cases, which you should document in your written submission.
You can submit just one file for the entire extended version.

Reference no: EM131453634

Questions Cloud

How seven tools of quality can used to improve your company : Using your current workplace as an example determine how the seven tools of quality can be used to improve your company.
Choose anyone living anytime who relates to american history : choose an American (not necessarily one born in America). Your topic does not have to live within the historical confines of this course.
Identify the two internal rates of return of the investment : Identify the two internal rates of return of the investment in exercise. Exercise: Use XNPV to value the following investment. Assume that the annual discount.
Evaluates and anticipates risks associated with investment : Evaluates and anticipates risks associated with the investment. Expands rewards for all major components of the value chain, which should include the company.
Write the boolean function as boolean algebra : Write the Boolean function as Boolean algebra terms. First, think about how to deal with the two outputs. Then, describe each single row in terms of Boolean algebra
Organizational structure and business behavior : Discuss the relationship between organizational structure and business behavior
What your life would have been like as an immigrant to us : Create a journal entry of 500 words reflecting on what your life would have been like as an immigrant to the U.S. from 1870 to 1920.
Discussing inherited disorders : When discussing inherited disorders, do most patients or their family believe that these disorders can be prevented?, treated? or cured
Discuss the role of darwinism in america : Write an essay that discusses the role of Darwinism in America. Include in your essay an explanation of how Darwinism was used to classify.

Reviews

len1453634

4/7/2017 1:21:07 AM

One folder named ”YourLastName FirstName StudentID” containing the following files: 1.Report for the written tasks (YourFullName.PDF). 2. Two Logisim files, one for task 1.2 and one for 1.3 call them LogicalCircuit.circ and OptimizedCircuit.circ respectively. 3. Two MARIE files for task 2.1, name the first one ”2.1.1 Multiplication” and name the second one ”2.1.2 Power”, submit .mas and .mex files. 4. Four MARIE files for task 2.2, name them ”2.2.1 Stack”, ”2.2.1 PushPop”, ”2.2.2 SimpleRPN” and ”2.2.3 MoreRPN” respectively, submit .mas and .mex files. Zip the folder under the same name and submit it to moodle.

Write a Review

Computer Engineering Questions & Answers

  Questionyou are the ciso for a fortune 500 online

questionyou are the ciso for a fortune 500 online auctioning company that is implementing big data technologies in

  Identify and research three different commercial it security

Prepare a report providing categorical feature comparison for the three products in the chosen category and make recommendations about the products to assist purchasing decision.

  Complete the design wlan based on ieee 802.11

Explain why 802.11b, is the first widely popular standard and still by far most used by the IT industry today.

  What will do to get deadline to receive a passing grade

What will do to get deadline to receive a passing grade? You have to complete and submit course project previous to the deadline to receive a passing grade for this course.

  Define the role of the registry in rmi

Consider matrix multiplication as a remote operation. assume the local machine does the I/O and a remote server does the multiplication. Why would we choose to divide the problem in this way?

  What part will the internet play in your plans

If you were responsible for setting up a network for a company that had offices in 5 different states, how would you do it? What part will the Internet play in your plans.

  Determining the spped of a computer

determining the spped of a computer

  Give an illustration in which polymorphism would be helpful

write a 200- to 300-word short-answer response to the followingprovide an example in which polymorphism would be

  Show the rbt after the bst-style deletion

Show the RBT after the BST-style deletion but before RB-Delete-Fixup - Identify whether there is a double black identifying the node, corresponding to underflow

  Craft a five pages paper on artificial intelligence

craft a 4-5 page paper on Artificial Intelligence with 4 or more new references (that you find). Choose a particular style for your references.

  Produce a thresholded binary image

E27: Computer Vision Spring 2016 - PROJECT 1. Thresholding. Your system will produce a thresholded binary image where the non-zero pixels correspond to objects of interest (foreground), and the zero pixels correspond to background. You will need t..

  Questionclass computer publicvoid retail pricevoid int p 2

questionclass computer publicvoid retail pricevoid int p 2 manufacturecostprintf d n p print pprivatevirtual int

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd