Implement in lc-3 assembly language

Assignment Help Assembly Language
Reference no: EM131294052

Cryptography

Description:

An encryption algorithm transforms "plain text" into "cipher text." Just like a door needs a key to lock and unlock it, an encryption algorithm often requires a key to encrypt and decrypt a message. For example, suppose the plain text message is HELLO WORLD. An encryption algorithm consisting of nothing more than replacing each letter with the next letter in the alphabet would produce the cipher text IFMMP XPSME. The decryption algorithm simply replaces each letter with the one before it, and presto: the plain text HELLO WORLD is produced.

Procedure:

Implement, in LC-3 assembly language, an encryption and a decryption programs that meet the following requirements:

The key is 6 and stored at x3100.

Your message is restricted to a maximum of 32 characters. They are stored at x3110 to x311F. The last ASCII code of the text string must be EOT (x04).

The encryption algorithm is as follows. Each ASCII code in the message will be transformed as follows:

The lower 4-bits of the code will be toggled. That is, if it is a 1, it will be replaced by 0 and vice verse.

The key will be added to the result of step 1 above.

The result should be stored at location x3120 to x312F.

For example, if the input (plain text) is A, toggles lower 4 bits, and the encryption key is 6, the program should take the ASCII value of A, 01000001, toggle bit [3:0], producing 01001110 and then add the encryption key, 6. The final output character would be 01000110, which is the ASCII value F.

Decryption algorithm is as follows. Each ASCII code in the message will be transformed as follows:

Subtract the encryption key from the ASCII code.

Toggle the low order bit of the result of step 1.

The result should be stored back to location x3110 to x311F.

Reference no: EM131294052

Questions Cloud

Determine the irreversibility rate of the boiler : Determine the irreversibility rate of the boiler, the boiler's entrance and exit specific flow availabilities and The boiler's heat input rate.
Compute the amount of direct materials used in production : Brickman Corporation, which began operations on January 1 of the current year, reported the following information: Esitmated Manufacturing Overhead $600,000 Actual manufacturing overhead 639,000. Compute the amount of direct materials used in product..
Determine the maximum reversible work available : The ground state total energy, total entropy, and temperature of the system are 1.00 Btu, 0.0619 Btu/K, and 70.0°F, respectively. Determine the maximum reversible work available from the can of soda.
What ground state temperature is required : If the ground state total energy and total entropy are 100. J and 0.5660 J/K, respectively, what ground state temperature is required to meet the inventor's maximum reversible work claim?
Implement in lc-3 assembly language : CPS2390 Computer Organization and Architecture - Implement, in LC-3 assembly language, an encryption and a decryption programs and Subtract the encryption key from the ASCII code.
What should the total energy of the cell be : If the total entropy of the cell must be ten times its ground state value, what should the total energy of the cell be?
Create a competitive economy in a globalized world : Review the following statement from your reading this week, "Diversity in the workplace is necessary to create a competitive economy in a globalized world." Find at least two articles that support this statement Provide complete APA References.
Determine the total availability of the water : Determine the total availability of the water in the bucket relative to the floor. The local environment is at 14.7 psia and 70.0°F.
Determine the specific availability of the helium : Determine the specific availability of the helium in the balloon relative to the ground, where the local environment is at p0 = 0.101 MPa and T0 = 20.0°C.

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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