quiz4_sol - CS 061 Computer Organization Quiz 4 Monday 2/6...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 061 – Computer Organization Winter - 2012 Quiz 4 – Monday 2/6 solution 1. Given that the ASCII codes for 'A' through 'Z' are x41 through x5A; and the codes for 'a' through 'z' are x61 through x7A: which of the following operations would “toggle” the case of a character stored in R0 - i.e. convert an upper-case character stored in R0 into lower case, and vice-versa (so ‘A’ would become ‘a’, and ‘a’ would become ‘A’). Note: the LC-3 stores ASCII characters in the lower ("right-hand") byte of a 16-bit word, with the upper byte set to zero. a. and R0 with x0020 b. or R0 with x0020 c. xor R0 with x0020 d. and R0 with x005F e. or R0 with x005F f. and R0 with x004F 2. Given the instruction (located at address xA400): xA400 LDR R1, R2, x0 and given: R2 contains the value xB000; memory location xB000 contains the value xC000; and memory location xC000 contains the value xD000; What value will R1 contain after the instruction executes? a.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/15/2012 for the course CS 61 taught by Professor Brianlinard during the Winter '12 term at UC Riverside.

Page1 / 2

quiz4_sol - CS 061 Computer Organization Quiz 4 Monday 2/6...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online