Convert each character in the input string to its opposite case, please use memory addresses to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Convert each character in the input string to its opposite case, please use memory addresses to get each character of the input string. Q2: (20 points) logic XOR operation has an interesting property. If an integer X is XORed with Y and the result Z is XORed with Y again, the result produced is X: Z = X xor Y (Z xor Y) = X The corresponded logic table: X 0 0 1 1 Y 0 1 0 1 X xor Y 0 1 1 0 (X xor Y) xor Y 0 0 1 1 This "reversible" property of XOR provides an easy way to perform data encryption: a plain text message can be transformed into an unintelligible string called cipher text by XORing each of its characters with a character called a key which should be defined as a constant. The cipher text can be stored or transmitted to a remote location and not able to be read by unauthorized persons who do not have the key. The intended viewer uses the key to decrypt the cipher text and produce the original plain text. Write an assembly language program in EMU8086 to do the following: 1. Ask user to enter a message (20 digits in length). 2. encrypt the account message with a. the key 39 (constant) if the message start with 'G', b. the key= 26 (constant) if the message start with 'N'. c. the key 58 (constant) if the message start with T. 3. print the encrypted string, cipher text, on the screen, 4. decrypt the encrypted string with the same key 5. print the decrypted string on the screen to verify the algorithm correctness. Convert each character in the input string to its opposite case, please use memory addresses to get each character of the input string. Q2: (20 points) logic XOR operation has an interesting property. If an integer X is XORed with Y and the result Z is XORed with Y again, the result produced is X: Z = X xor Y (Z xor Y) = X The corresponded logic table: X 0 0 1 1 Y 0 1 0 1 X xor Y 0 1 1 0 (X xor Y) xor Y 0 0 1 1 This "reversible" property of XOR provides an easy way to perform data encryption: a plain text message can be transformed into an unintelligible string called cipher text by XORing each of its characters with a character called a key which should be defined as a constant. The cipher text can be stored or transmitted to a remote location and not able to be read by unauthorized persons who do not have the key. The intended viewer uses the key to decrypt the cipher text and produce the original plain text. Write an assembly language program in EMU8086 to do the following: 1. Ask user to enter a message (20 digits in length). 2. encrypt the account message with a. the key 39 (constant) if the message start with 'G', b. the key= 26 (constant) if the message start with 'N'. c. the key 58 (constant) if the message start with T. 3. print the encrypted string, cipher text, on the screen, 4. decrypt the encrypted string with the same key 5. print the decrypted string on the screen to verify the algorithm correctness.
Expert Answer:
Answer rating: 100% (QA)
The image you sent is a question about converting characters to opposite case but lev... View the full answer
Related Book For
Computer Organization And Design The Hardware Software Interface
ISBN: 9780123747501
4th Revised Edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these programming questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Craig's Bowling Inc. operates several bowling centres (for games and equipment sales). The following transactions occurred in November 2017. For each of the following transactions, complete the...
-
Determine the equivalent resultant force acting on the bottom of the wing due to air pressure and specify where it acts, measured from point A. Given: a = 3 ft k = 86lb/ft3 w(x) = kx2 w(x)
-
Of the 217 airports available for public use in Belgium, 132 are paved. For a simple random sample of n = 50, what is the probability that at least 22 of the airports in the sample will be paved?
-
Consider PowerBar, the strategy for which is summarized in the PowerBar case. What implications for the culture, structure, systems, and people would you suggest given the nature of the product and...
-
(Pension Expense, Journal Entries, Amortization of Loss) Gottschalk Company sponsors a defined benefit plan for its 100 employees. On January 1, 2010, the companys actuary provided the following...
-
The eigenvalues, eigenvectors in Question-1 needs to be calculated by hand (not by computer). Questions-1: (9 mark) A car rental company has three locations. Every customer can rent from and return...
-
The Ace Trucking Company must determine the number of drivers and trucks to have available on a weekly basis. The standard schedule is to send drivers over the pickup and delivery route on Monday and...
-
Chemistry Explain Long`s synthesis with all the steps and reagents involved.
-
Rittenhouse Orthopedics, a for-profit physician group, had an equity balance of $1.3 million at the beginning of 2019. At the end of 2019, its equity balance was $1.9 million a. Assuming Rittenhouse...
-
Consider the following information: Total current assets Deferred income taxes Inventories Prepaid expenses Other assets Total current liabilities What is the quick ratio? $78,632 $3,210 $9,823...
-
Explain the process of cost allocation. Identify the components of a products cost. Explain how material, labor, and overhead costs are added to a product at each stage of the production process....
-
(a) What work was done by the electric force? (b) What is the potential of the starting point with respect to the end point? (c) What is the magnitude of the electric field? A particle with a charge...
-
Diego, a cash basis taxpayer, leased property on June 1, 2021, to Carlos at $325 per month. Carlos paid Diego $325 as a security deposit which may be applied as the last month's rent of the lease....
-
C2H4O2 + A Zn(C2H3O2)2 + CO2 + H2O . ZnCOz . Zn . Zn(HCO3)2 D. Zn(OH),
-
Establish identity. cos( + k) = (-1)k cos , k any integer
-
The first three problems in this Exercise refer to a critical section of the form lock(lk); operation unlock(lk); where the operation updates the shared variable shvar using the local (nonshared)...
-
For each stage of the pipeline, what are the values of the control signals asserted by this instruction in that pipeline stage? The first three problems in this exercise refer to the execution of the...
-
For the following problems, you will be using making modifications to the MIPS instruction set architecture. If the instruction set of the MIPS processor is modified, the instruction format must also...
-
In a(n)________ numbering system, all numeric values are written as sequences of 0s and 1s. a. hexadecimal b. binary c. octal d. decimal
-
What is a program?
-
List the five major components of a computer system.
Study smarter with the SolutionInn App