CS代考 FFH 100H 101H

1. Boolean Algebra and Logisim Task (35 marks)
Input Output A B C D Z1 Z2 000010 000110 001011 001110 010000 010100 011010 011110 100001 100101 101011 101110 110001 110100 111010 111100
Truth table for Z1 and Z2
Step 1: Boolean Algebra Expressions (10 marks)

Copyright By PowCoder代写 加微信 powcoder

Write the Boolean equation for your truth table in sum of products form (your choice). First, think about how to deal with the two outputs. Then, describe each single row in terms of Boolean algebra. Finally, combine the Boolean terms for each row into a larger term. Briefly explain these steps for the truth table given.

Step 2: Logical Circuit in Logisim (10 marks)
Model the resulting Boolean terms from Step 1 in a single Logisim circuit, using the basic gates AND, OR, NOT. Use the original Boolean expression for drawing the circuit (do not simplify the expression). You can use logic gates with more than two inputs.
􏰀􏰁 􏰃􏰁 􏰄􏰅􏰆􏰇 􏰄􏰈􏰇􏰉 􏰊􏰁􏰋 􏰅􏰈􏰌􏰍 􏰄􏰁 􏰋􏰇􏰍 􏰈 􏰄􏰍􏰎􏰏􏰐􏰈􏰄􏰍 􏰑􏰁􏰒􏰆􏰇􏰆􏰎 􏰓􏰆􏰐􏰍 􏰔􏰄􏰈􏰇􏰉􏰕􏰖􏰗􏰘􏰕􏰈􏰙􏰃􏰕􏰖􏰗􏰚􏰕􏰄􏰍􏰎􏰏􏰐􏰈􏰄􏰍􏰛 􏰄􏰅􏰈􏰄 􏰅􏰈􏰇 been provided with this assignment. Do not forget to rename it and do not change the labels or add any extra label, otherwise 2 marks will be detected.
Step 3: Optimised Circuit (15 marks)
The goal of this task is to find a minimal circuit (using only universal NAND gates). Based on the truth table and Boolean algebra terms from Step 1, optimize the function using Karnaugh maps.
You 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 􏰁􏰏􏰄􏰆􏰎􏰆􏰜􏰍􏰃 􏰝􏰁􏰁􏰐􏰍􏰈􏰙 􏰓􏰋􏰙􏰞􏰄􏰆􏰁􏰙􏰗 􏰀􏰅􏰍􏰙 􏰋􏰇􏰍 􏰑􏰁􏰒􏰆􏰇􏰆􏰎 􏰄􏰁 􏰞􏰟􏰍􏰈􏰄􏰍 􏰈 􏰐􏰁􏰒􏰆􏰞 􏰞􏰆􏰟􏰞􏰋􏰆􏰄􏰗 􏰠􏰁􏰙􏰡􏰄 􏰋􏰇􏰍 􏰈􏰙􏰊 􏰁􏰄􏰅􏰍􏰟 gates, other than NAND. Your documentation should also show how the equations have been
􏰢􏰇􏰍 􏰄􏰅􏰍 􏰄􏰍􏰎􏰏􏰐􏰈􏰄􏰍 􏰑􏰁􏰒􏰆􏰇􏰆􏰎 􏰓􏰆􏰐􏰍 􏰔􏰄􏰈􏰇􏰉􏰕􏰖􏰗􏰘􏰕􏰈􏰙􏰃􏰕􏰖􏰗􏰚􏰕􏰄􏰍􏰎􏰏􏰐􏰈􏰄􏰍􏰛 􏰄􏰅􏰈􏰄 􏰅􏰈􏰇 been provided with this assignment. Do not forget to rename it.
􏰀􏰅􏰍􏰙 􏰋􏰇􏰍 􏰑􏰁􏰒􏰆􏰇􏰆􏰎 􏰄􏰁 􏰞􏰟􏰍􏰈􏰄􏰍 􏰈 􏰐􏰁􏰒􏰆􏰞 􏰞􏰆􏰟􏰞􏰋􏰆􏰄􏰗 􏰠􏰁􏰙􏰡􏰄 􏰋􏰇􏰍 􏰈􏰙􏰊 􏰁􏰄􏰅􏰍􏰟 􏰒􏰈􏰄􏰍􏰇􏰣 􏰁􏰄􏰅􏰍􏰟 􏰄􏰅􏰈􏰙 NAND. Use 􏰄􏰅􏰍 􏰄􏰍􏰎􏰏􏰐􏰈􏰄􏰍 􏰑􏰁􏰒􏰆􏰇􏰆􏰎 􏰓􏰆􏰐􏰍 􏰔􏰄􏰈􏰇􏰉􏰕􏰖􏰗􏰚􏰕􏰄􏰍􏰎􏰏􏰐􏰈􏰄􏰍􏰛 􏰄􏰅􏰈􏰄 􏰅􏰈􏰌􏰍 􏰤􏰍􏰍􏰙 􏰏􏰟􏰁􏰌􏰆􏰃􏰍􏰃 􏰥􏰆􏰄􏰅 􏰄􏰅􏰆􏰇
assignment. Do not forget to rename it.
􏰞􏰅􏰈􏰙􏰒􏰍􏰃 􏰄􏰁 􏰔NAND 􏰁􏰙􏰐􏰊􏰛􏰗

2. MARIE (65 marks)
In this task you will develop a MARIE application that performs some manipulation of characters, strings and numbers. 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 files together with the rest of your assignment. The test cases should also be working, self-contained MARIE assembly files (without requiring much input from the user). The analysis needs to be submitted as part of the main PDF file you submit for this assignment.
Numbers, Characters and Strings Stored in MARIE Memory
This section introduces the concepts you need for the rest of the assignment. We can store numbers (Decimal or Hexadecimal) or characters in predefined memory locations in MARIE using a combination of the following commands: Input, ADR, StoreI & LoadI. The input data (number or character) can either be from a keyboard or from the program itself i.e. hardcoded.
􏰦􏰙 􏰄􏰅􏰍 􏰓􏰁􏰐􏰐􏰁􏰥􏰆􏰙􏰒 􏰍􏰧􏰈􏰎􏰏􏰐􏰍 􏰆􏰙 􏰨􏰆􏰒􏰋􏰟􏰍􏰖􏰣 􏰈 􏰋􏰇􏰍􏰟 􏰅􏰈􏰇 􏰍􏰙􏰄􏰍􏰟􏰍􏰃 􏰄􏰅􏰍 􏰃􏰍􏰞􏰆􏰎􏰈􏰐 􏰙􏰋􏰎􏰤􏰍􏰟 􏰔􏰘􏰩10􏰛 􏰓􏰟􏰁􏰎 􏰈 keyboard.
In-Class interviews: You will be required to demonstrate your code to your tutor after the
submission deadline. Failure to d􏰍􏰎􏰁􏰙􏰇􏰄􏰟􏰈􏰄􏰍 􏰥􏰆􏰐􏰐 􏰐􏰍􏰈􏰃 􏰄􏰁 􏰔􏰜􏰍􏰟􏰁 􏰎􏰈􏰟􏰉􏰇􏰛 being awarded to the
entire programming part of this assignment.
Instruction No. 1
Code Input
storeI myAdd
Memory Location (Hex)
0FFH 100H 101H
Memory Content
4 myAdd, HEX 100
One, DEC 1 Figure 1 (a)
Figure 1 (b)

These numbers, that are stored in memory, can be manipulated using a combination of available MARIE commands (e.g. Load, LoadI, add, subt, store & storeI).
Instruction No. 1
Code LoadI myAdd Add One
storeI myAdd
Memory Address (Hex)
0FFH 100H 101H
Memory Content
4 myAdd, HEX 100
One, DEC 1 Figure 2 (a)
Figure 2 (b)

2.1 Multiplication (10 marks)
Implement a subroutine called Multiply to multiply any two numbers (based on the multiplication code you wrote in the labs).
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) that contains the subroutine. Hint: one possible implementation is given below
result < 0 repeat until times >= X:
result < result + Y times < times + 1 Note: this program (subroutine) needs two numbers A and B as inputs, and produces result as an output. For simplicity, assume the two numbers are positive. Document at least two test cases using screenshots of what two values and the result are. The document should be written into the report. Such as the screenshot in Figure 3. 2.2 Write a MARIE Program to Implement Exponential Operation by Modifying the Multiplication Algorithm (15 marks) Write a MARIE program to implement an exponential function that computes BE for two 􏰙􏰋􏰎􏰤􏰍􏰟􏰇 􏰝 􏰈􏰙􏰃 􏰪􏰗 􏰫􏰍􏰟􏰍􏰣 􏰬􏰪􏰡 􏰆􏰇 􏰄􏰅􏰍 􏰍􏰧􏰏􏰁􏰙􏰍􏰙􏰄 􏰈􏰙􏰃 􏰬􏰝􏰡 􏰆􏰇 􏰄􏰅􏰍 􏰤􏰈􏰇􏰍􏰗 􏰀􏰅􏰆􏰇 􏰥􏰁􏰟􏰉􏰇 􏰈􏰐􏰎􏰁􏰇􏰄 􏰄􏰅􏰍 􏰇􏰈􏰎􏰍 way as multiplication. You can extend the multiplication algorithm to implement the exponential function. Algorithm for Exponential Operation [ BE -> R]
Note: this program (a subroutine) needs two numbers B and E as inputs, and produces R as an output.
1. SetR=1,
2. If E = 0, Jump to Line 6
3. Do Multiplication (R * B -> R)
5. Jump to Line 2
Document at least two test cases using screenshots of what two values and the result are. The document should be written into the report. Such as the screenshot in Figure 4.

2.3 Write a MARIE Program to Implement Division & Remainder
Operations (15 marks)
Prepare a MARIE subroutine called DIV which computes the quotient and remainder for dividing a number. Division operation can be achieved by repeated subtraction (numerator – denominator) operations until we get a quotient smaller than the denominator, while the remainder can be derived from this division process when we get a quotient that is equal to zero. An algorithm for this is given below:
Algorithm for Division & Remainder Operation [N / D -> Producing Q and R]
Note: this program needs N (the numerator) and D (the denominator) as inputs, and produces Q (the quotient) and R (the remainder) as outputs.
1. SetR=0,Q=0
2. IsNCS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com