Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Math 350: Applied Algebra - Codes & Ciphers Spring 2009 - Prof. Julie M. Clark, Assignments of Mathematics

A portion of the spring 2009 course materials for math 350: applied algebra, focusing on codes and ciphers. It covers topics such as decimal, binary, and hexadecimal number systems, conversion between them, and binary arithmetic. It also introduces morse code and ascii codes.

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-38j-1
koofers-user-38j-1 🇺🇸

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 350: Applied Algebra Codes & Ciphers Spring 2009
Codes – Class 1
Decimal Binary Hexadecimal Decimal Binary Hexadecimal
0 8
1 9
2 10
3 11
4 12
5 13
6 14
7 15
Binary ‘Words’
1 2 1 0 2
0
( ) 2
n
i
n n i
i
b b b b b b
Converting from binary to decimal:
(1101)2 =
(10101)2 =
(111)2 = (1110)2 = (111111)2 =
How can you tell a binary number is odd? Even?
Converting from decimal to binary:
12310 =
5410 =
Binary arithmetic:
Addition: (10110)2 + (1111)2 =
Multiplication: (1011)2 * (101)2 =
Long division:
2 2
(101101) (1101)
=
Page 1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Math 350: Applied Algebra - Codes & Ciphers Spring 2009 - Prof. Julie M. Clark and more Assignments Mathematics in PDF only on Docsity!

Codes – Class 1

Decimal Binary Hexadecimal Decimal Binary Hexadecimal 0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15 Binary ‘Words’ (^) 1 2 1 0 2 0

n i n n i i

b b  b b b b

Converting from binary to decimal: (1101) 2 = (10101) 2 = (111) 2 = (1110) 2 = (111111) 2 = How can you tell a binary number is odd? Even? Converting from decimal to binary: 12310 = 5410 = Binary arithmetic: Addition: (10110) 2 + (1111) 2 = Multiplication: (1011) 2 * (101) 2 =

Long division: (101101)^2 (1101)^2 =

Hexadecimal Codes: Powers of 16: 160 =1, 16^1 = 16, 16^2 = 256, 16^3 = 4096, 16^4 = 65536, 16^5 = 1,048,576, 16^6 = 1,6777,216, 167 = 268,435,456, … Converting binary to hex: (1011001011101000101101111) 2 = (1011000111000101) 2 = Converting hex to binary: (5F90A) 16 = (3D7) 16 = Converting hex to binary: (5F90A) 16 = (3D7) 16 = Converting decimal to hex & vice versa: A79B) 16 = 5000 =

ASCII

ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for their original purpose. Below is the ASCII character table and this includes descriptions of the first 32 non-printing characters. ASCII was actually designed for use with teletypes and so the descriptions are somewhat obscure. If someone says they want your CV however in ASCII format, all this means is they want 'plain' text with no formatting such as tabs, bold or underscoring - the raw format that any computer can understand. This is usually so they can easily import the file into their own applications without issues. Notepad.exe creates ASCII text, or in MS Word you can save a file as 'text only' 22 4D 61 74 68 65 6D 61 74 69 63 73 20 69 73 20 74 68 65 20 71 75 65 65 6E 20 6F 66 20 74 68 65 20 73 63 69 65 6E 63 65 73 2E 22

Morse Code International Morse Code Braille

Homework #

  1. a) Convert 45 to binary. b) Convert 122 to binary. c) Convert (10101011100001110101001101010100) 2 to hexadecimal. d) Convert (5AB92) 16 to binary. e) Convert (43BD) 16 to decimal. f) Convert 50927341 to hexadecimal. g) Compute (2B) 16 * (C1F) 16 and express the result in hexadecimal notation. h) Compute (1011011) 2 * (10111) 2. i) Compute (1110001) 2 (1011)^2 using binary long division.
  2. Convert the following sequence of (decimal) ASCII codes into an English sentence. 34 66 108 97 99 107 32 104 111 108 101 115 32 97 114 101 32 119 104 101 114 101 32 71 111 100 32 100 105 118 105 100 101 100 32 98 121 32 122 101 114 111 46 34 45 83 116 101 112 104 101 110 32 87 114 105 103 104 116
  3. Use the web site: http://www.omnicron.com/~ford/java/NMorse.html to interpret the following message: ▪ ▬ ▬ ▬ ▪ ▬ ▬ ▪ ▬ ▪ ▬ ▪ ▪ ▪ ▬ ▪ ▬ ▪ ▬ ▬ ▬ ▪ ▬ ▪ ▪ ▪ ▬ ▪ ▪ ▪ ▬ ▬ ▪ ▪ ▬ ▬ ▬ ▬ ▬ ▪ ▬ ▪ ▪ ▪ ▪ ▪ ▬ ▪ ▪ ▪ ▪ ▬ ▪ ▪ ▪ ▪ ▬ ▬ ▪ ▪ ▪ ▪ ▪ ▬ ▪ ▬ ▪ ▪ ▪ ▪ ▬ ▪ ▪ ▬ ▬ ▪ ▪ ▬ ▪ ▪ ▬ ▪ ▬ ▪ ▪ ▬ ▪ ▬ ▬ ▪ ▬ ▬ ▪ ▪ ▬ ▪ ▪ ▪ ▪ ▬ ▬ ▪▪ ▬ ▪ ▬ ▪ ▪ ▪ ▬ ▬ ▪ ▬ ▬ ▬ ▪ ▬ ▪ ▬ ▪ ▬ ▪ ▪ ▬ ▪ ▪ ▬ ▪ ▪ ▪ (You can type Morse code into the Input box using "." for a dot and "-" or "_" for a dash. Letters are separated by spaces and words by "/" or "|".)
  4. Translate the following phrase adapted from the novel The Little Prince by Antoine de Saint-Exupéry.

Maple Explorations (Homework #1 cont.):

  1. Input the following Maple code:

    convert(101001, decimal, binary); convert(15, binary); convert(3985, hex); convert("E85", decimal, hex); Explain the Maple’s convert command. How do you use it to convert from decimal to binary or hex? From binary to decimal? From binary to hex? From hex to binary or decimal?

  2. Use Maple to make the following conversions. a) 121 to binary and hex b) (12F9B0) 16 to decimal and binary c) (1110111110110011) 2 to hex and decimal
  3. Input the following Maple code:

    floor(12.674); floor(Pi); floor(-5.3); floor(exp(1)); floor(12); floor(-5); Explain Maple’s floor command.

  4. Input the following Maple code:

    ceil(12.674); ceil(Pi); ceil(-5.3); ceil(exp(1)); ceil(12); ceil(-5); Explain Maple’s ceil command.

  5. Consider the following Maple code: > n:=23: > i:=0: > while n>0 do > b[i]:=n-floor(n/2)2;* > n:=floor(n/2); > i:=i+1; > od: > print(b[i-j] $j=1..i); Now – change the value of n , then re-execute the code. Continue to experiment with this code until you can explain the relationship between this code and the algorithm for converting from decimal to binary numbers that we used in class. e.g. 23 = 1+2(1+2(1+2(0+2(1)), 23 = 10111 2