Assignment2-1

3
Matt Ginsberg Assignment 2.1 4.2 a. binary: 0101101 0110011 0101100 0110001 0110100 0110001 0110101 hexadecimal: 2D 33 2E 31 34 31 35 octal: 055 063 054 061 064 061 065 decimal: 45 51 46 49 52 49 53 b. hexadecimal: 4E F1 6B F2 F5 F0 4B F1 4.3 Converting the code to hexadecimal, the message reads 54 68 69 73 20 69 73 20 45 41 53 59 21. Now reading from the table on page 65 of the textbook , the message is This is EASY! 4.5 a. X * b. The code is self-delimiting. Each combination of 1's and 0's is unique, so that a sliding pattern matcher can identify each code. A dropped bit during transmission would make it possible to "lose sync". Suppose the leading 0 in the character 01011 is dropped. If this character is followed by another character that starts with a 0, the system will read the code as the character as 10110, and this error can propagate. If a bit gets switched, it is possible to confuse two characters, For example, if the character code 01101 becomes 01100, it is impossible to distinguish this character from 01110. This error is self-correcting in the sense that the next character can still be correctly identified.

description

2-1

Transcript of Assignment2-1

Page 1: Assignment2-1

Matt Ginsberg

Assignment 2.1

4.2

a. binary: 0101101 0110011 0101100 0110001 0110100 0110001 0110101 hexadecimal: 2D 33 2E 31 34 31 35 octal: 055 063 054 061 064 061 065 decimal: 45 51 46 49 52 49 53

b. hexadecimal: 4E F1 6B F2 F5 F0 4B F1

4.3

Converting the code to hexadecimal, the message reads 54 68 69 73 20 69 73 20 45 41 53 59 21.

Now reading from the table on page 65 of the textbook , the message is This is EASY!

4.5

a. X * b.

The code is self-delimiting. Each combination of 1's and 0's is unique, so that a sliding pattern matcher can identify each code. A dropped bit during transmission would make it possible to "lose sync". Suppose the leading 0 in the character 01011 is dropped. If this character is followed by another character that starts with a 0, the system will read the code as the character as 10110, and this error can propagate. If a bit gets switched, it is possible to confuse two characters, For example, if the character code 01101 becomes 01100, it is impossible to distinguish this character from 01110. This error is self-correcting in the sense that the next character can still be correctly identified.

4.6

The answer depends upon the system that the student is using, of course, but with most students working on ASCII-based systems, the expected integer values would be ORD(A) = 65, ORD(B) = 66, ORD(c) = 99, results taken from the ASCII table. If the student switches to an EBCDIC-based system, the results would change.

Page 2: Assignment2-1

4.7

This is a programming problem. It can be solved most easily with a table. An algebraic approach is more difficult because the EBCDIC alphabetic values are split up differently than the ASCII codes.

5.9

a. 11001101101 = 1 + 4 + 8 + 32 + 64 + 512 + 1024 = 1645 111010111011 = -101000101 = - (1 + 4 + 64 + 256) = -325 (1)010100101000 = 8 + 32 + 256 + 1024 = 1320

b. 101011001100 = - 010100110100 = -1332 111111111100 = - 100 = - 4 (1)101011001000 = - 010100111000 = -1336

5.10

The largest positive four-digit 10's complement number is 4999, therefore the largest positive digit that can be added to 2468 is 4999 - 2468 = 2531.

5.11

In 12's complement base 12, the midpoint value is 6, therefore any number that starts with 6, 7, 8, 9, A, or B is negative, otherwise the number is positive

5.17

a. 123.57 1015 = 1.2357 1017. With exponent excess-49, the result is 0661236.

b. The smallest storable number is represented by 0000001 = 0.001 10^-49