Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program below is intended to implement a simple substitution cypher on an arbitrary sequence of characters stored in memory, such that each letter (A

The program below is intended to implement a simple substitution cypher on an arbitrary sequence of characters stored in memory, such that each letter (A through Z) is replaced by the letter 13 positions further on in the alphabet with wraparound. This results in the substitutions: \[ \mathrm{A} ightarrow \mathrm{N}, \mathrm{B} ightarrow \mathrm{O}, \mathrm{C} ightarrow \mathrm{P}, \ldots, \mathrm{M} ightarrow \mathrm{Z}, \mathrm{N} ightarrow \mathrm{A}, \mathrm{O} ightarrow \mathrm{B}, \mathrm{P} ightarrow \mathrm{C}, \ldots, \mathrm{Y} ightarrow \mathrm{L}, \mathrm{Z} ightarrow \mathrm{M} \] Any other character values which might appear in the sequence, but which are not letters (i.e. numbers, punctuation, etc.), are not substituted and are thus left unchanged. Each character is stored in memory using standard ASCII character codes where the letters A through Z have the following code values: \[ A=0 \times 41, B=0 \times 42, C=0 \times 43, \ldots, X=0 \times 58, Y=0 \times 59, Z=0 \times 5 A \] (The code values for other characters are not shown.) The program below contains four errors. (Line number are indicated at the left of each line above.) a) What is the purpose of the value loaded into register R1 at the beginning of the program? b) The program on the previous page contains errors on four different lines. Circle each error and in the space provided below briefly explain what the error is, and how you would correct it. Error 1: Error 2: Error 3: Error 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Principles Volume 1

Authors: Jerry J. Weygandt, Donald E. Kieso, Paul D. Kimmel, Barbara Trenholm, Valerie Warren, Lori Novak

8th Canadian Edition

111950242X, 1-119-50242-5, 978-1119502425

More Books

Students also viewed these Accounting questions

Question

5. Give examples of binary thinking.

Answered: 1 week ago