[SOLVED] C data structure assembly network security MARIE MCD4700 Introduction to Computer Systems, Networks and Security

$25

File Name: C_data_structure_assembly_network_security_MARIE_MCD4700__Introduction_to_Computer_Systems,_Networks_and_Security.zip
File Size: 1064.46 KB

5/5 - (1 vote)

MCD4700 Introduction to Computer Systems, Networks and Security
Assignment 1 Trimester 3, 2019
Submission guidelines
This is an individual assignment, group work is not permitted
Deadline: December 4, 2019, 7:55pm
Submission format: docx for the written tasks, LogiSim circuit files for task 1, MARIE assembly files for task 2. All files must be uploaded electronically via Moodle.
Late submission:
By submitting a Special Consideration Form or visit this link: https://lms.monashcollege.edu.au/course/view.php?id=1331
Or, without special consideration, you lose 5 marks of your mark per day that you submit late (including weekends). Submissions will not be accepted more than 5 days late.
This means that if you got Y marks, only Y-n*5 will be counted where n is the number of days you submit late.
In-class interviews: See instructions for Task 2 for details.
Marks: This assignment will be marked out of 100 points, and count for 20% of your
total unit marks.
Plagiarism: It is an academic requirement that the work you submit be original. If there is any evidence of copying (including from online sources without proper attribution), collaboration, pasting from websites or textbooks, Zero marks may be awarded for the whole assignment, the unit or you may be suspended or excluded from your course. Monash Colleges policies on plagiarism, collusion, and cheating are available here or see this link: https://www.monashcollege.edu.au/__data/assets/pdf_file/0010/17101/dip-assessment-policy.pdf
Further Note: When you are asked to use Internet resources to answer a question, this does not mean copy-pasting text from websites. Write answers in your own words such that your understanding of the answer is evident. Acknowledge any sources by citing them.

1. Boolean Algebra and Logisim Task (35 marks)
Input
Output
A
B
C
D
Z1
Z2
0
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
1
0
0
0
1
1
0
1
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
0
0
1
0
1
1
1
1
0
1
0
0
0
1
0
1
0
0
1
0
1
1
0
1
0
1
0
1
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
0
1
1
1
0
0
1
1
1
1
1
1
0
Truth table for Z1 and Z2
Step 1: Boolean Algebra Expressions (10 marks)
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.
1

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.
To do this task you have to use a template Logisim file task_1.2_template that
have been provided with this assignment. Do not forget to rename the file before saving your circuit in it. And, 2 marks will be deducted if you change the labels (or adding any extra label).
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 optimized Boolean function.
Then use Logisim to create a logic circuit. Dont use any other gates, other than NAND.
Use the template Logisim file task_1.3_template that have been provided with this assignment. Do not forget to rename it.
2

2. MARIE (65 marks)
In this task you will develop a MARIE application that performs some manipulation of strings.
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.
Name as a String
This section introduces the concepts you need for the rest of the assignment. A string is a sequence of characters. Its the basic data structure for storing text in a computer. There are several different ways of representing a string in memory and how to deal with strings of arbitrary length.
For this assignment, we will use the following string representation:
A string is represented in contiguous memory locations, with each address containing one character.
The characters are encoded using the ASCII encoding.
End of a string is marked by the ASCII character . (i.e. dot or full-stop).
A string can be of any arbitrary length, and will be terminated by a ., and it may
contain any of the following: alphabets (A-Z, a-z), numbers (0-9) and ASCII Space Character (Hex 020).
Here is an example. A string John Nguyen. will be represented in memory (written as hexadecimal numbers):
Note that, for a string with n characters, we need (n+2) words of MARIE memory in order to store all the characters belonging to that string (including a space and a . characters).
In MARIE assembly language programming, we can make use of the ADR command, the HEX keyword and a label myString to put this string into memory:
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.
04A
06F
068
06E
020
04E
067
075
079
065
06E
02E
J
o
h
n
N
g
u
y
e
n
.
3

addrMyString, ADR myString myString, HEX 04A /J HEX 06F /o HEX 068 /h HEX 06E /n
HEX 020 /Space HEX 04E /N HEX 067 /g HEX 075 /u HEX 079 /y HEX 065 /e HEX 06E /n HEX 02E /.
4

2.1 Your name as a MARIE string (10 marks)
The following example of a MARIE string nameID encodes a name and an ID using ASCII characters. The name is separated from the ID by an ASCII character Hex 00A (New Line). Different parts of a name are separated by another ASCII character Hex 020 (Space). And, the string is terminated by a dot . character. The label addrNameID holds the address of the first character of the string. You need to follow this MARIE string while solving the task given below.
addrNameID, ADR nameID
nameID, HEX 04A HEX 06F HEX 068 HEX 06E HEX 020 HEX 04E HEX 067 HEX 075 HEX 079 HEX 065 HEX 06E HEX 00A HEX 032 HEX 031 HEX 032 HEX 033 HEX 039 HEX 037 HEX 039 HEX 038 HEX 02E
/J
/o
/h
/n /Space /N
/g
/u
/y
/e
/n
/NL(New Line) /2
/1 /2 /3 /9 /7 /9 /8 /.
Prepare a MARIE program to encode a string that include your full name (first name and last name) and your student ID using ASCII characters. Following the above example, you need to use two labels, one label (e.g. nameID) to store the first character of the string, and another label (e.g. addrNameID) to store the address of the first character of the same string.
You need to submit a MARIE file that contains codes, using the ADR command and HEX keywords (like the above example), so that after assembling, your name, ID and the address (of the first character of the string) is stored in MARIE memory.
5

2.2 A subroutine for printing a string (15 marks)
Prepare a MARIE subroutine called subPrintString that can print the ASCII . terminated string of your name and your student ID that you have implemented in task 2.1. You may use the Output instruction to print characters in the MARIE output space.
To receive full marks, your code needs to be in the form of a subroutine that can be called using the JnS instruction. You need to write a MARIE main program to call this subroutine.
Hint: In your main program, you need to use a label StringAdd that holds the start address of the string (like, addrNameID) that you want to print. Then, you should call the subroutine subPrintString. In the subroutine, the codes should then load a character from the address StringAdd, print the character, then increment the address by one, and keep doing that upto the character loaded from the address is a . (which signals the end of the string). The output may look similar to the output below.
2.3 A subroutine to count the number of Alphabets in a string (15 marks)
Prepare a MARIE subroutine called subCountAlpha to count the number of alphabets ([A Z] or [a z]) that are present in the ASCII . terminated string of your name and your student ID that you have implemented in task 2.1. The subroutine also needs to print this count (i.e. the total number of alphabets that are present in the string).
To receive full marks, your code needs to be in the form of a subroutine that can be called using the JnS instruction. You need to write a MARIE main program to call this subroutine.
Hint: In your main program, you need to use a label StringAdd that holds the start address of the string (like, addrNameID) that you want to use. Then, you should call the subroutine subCountAlpha. In the subroutine, the codes should then load a character from that address, include it in your count if it is an alphabet, then increment the address by one, and keep doing that until the character loaded from the address is a . (which signals the end of the string). After completing the counting process, your program will print the count, for which the output may look similar to the output below.
John Nguyen
21239798
10
6

2.4 A subroutine to count the number of numeric characters in a string
(15 marks)
Prepare a MARIE subroutine called subCountNumerics that can count the number of numeric characters [0 9] that are present in the ASCII . terminated string of your name and your student ID that you have implemented in task 2.1. The subroutine also needs to print this count (i.e. the number of numeric characters that are present in the string).
To receive full marks, your code needs to be in the form of a subroutine that can be called using the JnS instruction. You need to write a MARIE main program to call this subroutine.
Hint: In your main program, you need to use a label StringAdd that holds the start address of the string (like, addrNameID) that you want to use. Then, you should call the subroutine subCountNumerics. In the subroutine, the codes should then load a character from that address, include it in your count if it is a numeric character, then increment the address by one, and keep doing that until the character loaded from the address is a . (which signals the end of the string). After completing the counting process, your program will print the count, for which the output may look similar to the output below.
2.5 A subroutine to read alphabets from keyboard, store them in a
string, and later, print the string (10 marks)
Prepare a MARIE subroutine called subSeperateAlpha that should read any character from keyboard, and accepts only the alphabets ([A Z] or [a z]), to store in an ASCII . terminated string. You need to store the . character in the memory to mark the end of the string. The subroutine also needs to print this string.
You may use memory address Hex100 or Hex 200 to store your string depending on the length of your program code. Ideally, the string location should be well higher in memory than the last memory location used by your program.
To receive full marks, your code needs to be in the form of a subroutine that can be called using the JnS instruction. You need to write a MARIE main program to call this subroutine.
Hint: In your main program, you need to use a label StringAdd that will hold a memory location in MARIE as the start address of the string that you are going to enter from the keyboard. Then, you should call the subroutine subSeperateAlpha. In the subroutine,
8
7

the codes should then read a character from the keyboard, accept it if is an alphabet, then increment the address by one, and keep doing that until the character entered is a ., which signals the end of the data entry process. You need to store the . character as well. After completing the name entry process, your program will print the string, for which the output may look similar to the output below.
Files to be submitted:
One folder named YourFirstNameLastNameStudentID containing the following files:
1. Report for the written tasks (One Word file called YourFirstNameLastName
StudentID.doc / docx). The report should include your Full name, your student ID,
your class number and your tutors name.
2. Two Logisim files, one for task 1.2 and one for 1.3, name them LogicalCircuit.circ and
OptimizedCircuit.circ respectively.
3. MARIE files for tasks 2.1 to 2.5 name them as below:
2_1_NameIDString.mas 2_2_PrintNameID.mas
2_3_CountAlpha.mas
2_4_CountNumeric.mas 2_5_SeperateAlpha.mas
Zip the folder under the same name and submit it to moodle. You need to make sure there are no spaces in any of the filenames.
Input: Austr ali3700a,.
Output: Australia
NOTE! Your submitted files must be correctly identified (as described above).
Any submission that does not comply will receive an automatic 10 marks
penalty (applied after marking).
8

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] C data structure assembly network security MARIE MCD4700 Introduction to Computer Systems, Networks and Security
$25