Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
47 views17 pages

New The World of The Internet Handouts

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 17

Introduction to Binary 1

Introduction to Binary
The binary system is a way of 1011110000011111
representing data using 0s and 1s. This 0010101000100101
system is used by computers to
0101010011111001
0100001001010100
represent all the data it works with.
0010010010101010
0011001011
Decimal System:
The number system we use in everyday life is called the decimal system,
where we use the numbers 1,2,3,4,5,6,7,8,9 to represent all of our numbers.
In this system, each digit is a power of 10.
Digit value

4 3 7 9
103 102 101 100
= 1000 = 100 = 10 = 1
Place value

To compute a number in this system, you would multiply the digit value
by the place value, then add them all together. So to represent the
number 4379, you would have to compute :
(4*1000)+(3*100)+(7*10)+(9*1)=4379.

The binary system follows a similar structure, except for each


digit, you only have 2 values, 0 and 1.

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Digit value Introduction to Binary 2

0 0 0 0 1 0 0 1

27 26 25 24 23 22 21 20
= 128 = 64 = 32 = 16 = 8 = 4 = 2 = 1

Place value

To compute a number in this system, you would multiply the digit value
by the place value, then add them all together. So to translate the binary
number 1001, you would have to compute:
(1*8)+(0*4)+(0*2)+(1*1) = 9

To convert this number back to binary, find the largest power of 2 and
subtract until your total is 0

9 - ( 1 * 23 ) = 9 - 8 = 1 so 4th digit is 1
22 = 4 > 1 so 3rd digit is 0
21 = 2 > 1 so 2nd digit is 0
1 - ( 1 * 10 ) = 1 - 1 = 0 so 1st digit is 1

So the resulting number is 1001.

Let’s try a few!


Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Introduction to Binary 3

Binary Practice Digit value


Clue!
Problems If the decimal value is odd,
then the 1st digit must be a 1

27 26 25 24 23 22 21 20
= 128 = 64 = 32 = 16 = 8 = 4 = 2 = 1

Place value
Refer to this for help!

Convert the following decimal values into binary:

1) 8

2) 17

3) 11

4) 36

5) 70

6) 132

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Introduction to Binary 4

Binary Practice Digit value


Clue!

Problems If the 1st digit is a 1, then the


decimal value must be odd

27 26 25 24 23 22 21 20
= 128 = 64 = 32 = 16 = 8 = 4 = 2 = 1

Place value
Refer to this for help!

Convert the following binary values into decimal:

1) 0 0 1 0

2) 1 1 1 0

3) 1 0 1 1

4) 0 0 1 0 0 0 0 1

5) 0 0 0 1 1 0 1 0

6) 1 0 1 0 1 0 1 0
7)

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
ANSWER KEY Introduction to Binary 5

Binary Practice Digit value


Clue!
Problems If the decimal value is odd,
then the 1st digit must be a 1

27 26 25 24 23 22 21 20
= 128 = 64 = 32 = 16 = 8 = 4 = 2 = 1

Place value
Refer to this for help!

Convert the following decimal values into binary:

1) 8 0 0 0 0 1 0 0 0

2) 17 0 0 0 1 0 0 0 1

3) 11 0 0 0 0 1 0 1 1

4) 36 0 0 1 0 0 1 0 0

5) 70 0 1 0 0 0 1 1 0

6) 132 1 0 0 0 0 1 0 0

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
ANSWER KEY Introduction to Binary 6

Binary Practice Digit value


Clue!

Problems If the 1st digit is a 1, then the


decimal value must be odd

27 26 25 24 23 22 21 20
= 128 = 64 = 32 = 16 = 8 = 4 = 2 = 1

Place value
Refer to this for help!

Convert the following binary values into decimal:

1) 0 0 1 0 2

2) 1 1 1 0 14

3) 1 0 1 1 11

4) 0 0 1 0 0 0 0 1 33

5) 0 0 0 1 1 0 1 0 26

6) 1 0 1 0 1 0 1 0 170

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Ciphers! 7

Activity: Encode and


Decode your own message!
Using one of the ciphers we learned about along with the
template below, encode your own message. Then decode it to
see if your cipher worked!
(If you did it right, your message before encoding and after
decoding will be the same!)

AB CD E F GH I J K LMNO P QR S TUV WXYZ

*Remember to pick a key, go down to encode, and up to decode!

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Ciphers! 8

Challenge: Make your own


Cipher!
Try to make a new way to encode a message. Make sure your
new cipher uses a small key, so that only the people with access
to the key know how to use it. Encode and then decode your
message to see if your new cipher works!

(If you did it right, your message before encoding and after
decoding will be the same!)
AB CD E F GH I J K LMNO P QR S TUV WXYZ

*Remember to pick a key, go down to encode, and up to decode!

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Ciphers! 1

Ciphers!
Ciphers are a way of writing a message in a
secret way (sort of like a secret language!).

● To encode a message is to translate a normal


message into a coded one.
● To decode a message is to translate a coded
message back into normal language

Caesar Cipher:
Shifting the alphabet by a number of letters.
Positive number: Shift Right
Negative number: Shift Left

EXAMPLE 1: Encode, KEY = 3


A B C D E F G H I J K L M N O P

D E F G H I J K L M N O P Q R S

H E L L O K H O O R

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Ciphers! 2
EXAMPLE 2: Encode, KEY = -5
A B C D E F G H I J K L M N O P

V W X Y Z A B C D E F G H I J K

H E L L O C Z G G J

EXAMPLE 3: Decode, KEY = -5 *use chart from above

V K K G Z A P P L E

Simple Substitution Cipher:


Shifting the alphabet by setting the first few letters to a certain
word, then setting the rest of the alphabet with the remaining
letters after the word is removed (in alphabetical order).

EXAMPLE 4: Encode, KEY = CODE


A B C D E F G H I J K L M N O P

C O D E A B F G H I J K L M N P

H E L L O G A K K N
Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Ciphers! 3

Ciphers Practice
Problems

1) Use the Caesar Cipher to encode this message:

“CIPHERS ARE COOL!”


*Try filling out this chart
with the shift before
KEY = 7 encoding the message.

AB CD E F GH I J K LMNO P QR S TUV WXYZ

2) Use the same key as question 1 to decode the message:

“P AVAHSSF HNYLL!” (using Caesar Cipher)

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Ciphers! 4

Ciphers Practice
Problems

3) Use the Simple Substitution Cipher to encode this message:

“CAN YOU CRACK THE CODE?”


*Try filling out this chart
KEY = “SHIFT” with the shift before
encoding the message.

AB CD E F GH I J K LMNO P QR S TUV WXYZ

4) Use the same key as question 1 to decode the message:

“UQT NSQQWMPFQ RM QRSY QSAT!”

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
ANSWER KEY Ciphers! 5

Ciphers Practice
Problems

1) Use the Caesar Cipher to encode this message:

“CIPHERS ARE COOL!”


*Try filling out this chart
with the shift before
KEY = 7
encoding the message.

AB CD E F GH I J K LMNO P QR S TUV WXYZ

H I J K LMNOP Q R S T UV WXY Z AB C DE F G

J P W O L Y Z H Y L J V V S !

2) Use the same key as question 1 to decode the message:

“P AVAHSSF HNYLL!” (using Caesar Cipher)

I T O T A L L Y A G R E E !

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
ANSWER KEY Ciphers! 6

Ciphers Practice
Problems

3) Use the Simple Substitution Cipher to encode this message:

“CAN YOU CRACK THE CODE?”


*Try filling out this chart
KEY = “SHIFT” with the shift before
encoding the message.

AB CD E F GH I J K LMNO P QR S TUV WXYZ

SH I F TA BCDE G J KLMNOPQR UVWXYZ

I S L YM U I P S I G R C T I M F T ?

4) Use the same key as question 1 to decode the message:

“UQT NSQQWMPFQ RM QRSY QSAT!”

U S E P A S S W O R D S T O

S T A Y S A F E !

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
The Protocol System 1

The Protocol System


The protocol system is a set of steps used to send
information over the internet.

Match the layer name to the descriptions below. Then number the

layers from 1 to 4, with 1 being the top layer connected to the

computer and 4 being the bottom layer connected to the internet.

Layers: IP, Application, Hardware, TCP

Layer Order Layer Name Layer Description

Splits information into packets


and numbers them.

Routes packets over internet.

Assigns IP addresses of start


and end to packets.

Converts user’s command into a


message to be sent over the
internet.

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
ANSWER KEY The Protocol System 2

The Protocol System


The protocol system is a set of steps used to send
information over the internet.

Match the layer name to the descriptions below. Then number the

layers from 1 to 4, with 1 being the top layer connected to the

computer and 4 being the bottom layer connected to the internet.

Layers: IP, Application, Hardware, TCP

Layer Order Layer Name Layer Description

2 TCP Splits information into packets


and numbers them.

4 Hardware Routes packets over internet.

3 IP Assigns IP addresses of start


and end to packets.

Converts user’s command into a


Application message to be sent over the
1 internet.

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand
Here are some links to activities and information related to the topics discussed in 

the module. Have fun! 

● https://learningcontent.cisco.com/games/binary/index.html 

● https://www.cmu.edu/iso/aware/protect-what-you-connect/malware.html  

● https://howsecureismypassword.net/  

● https://www.cryptoclub.org/#vIntro  

● http://www.carnegiecyberacademy.com/  

● https://myshadow.org/  

Created for the Leonard Gelfand Center by Vasudha Srinivasan, downloaded from www.cmu.edu/gelfand

You might also like