Professional Documents
Culture Documents
COMP-202 Week 1
Melanie Lyman-Abramovitch
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Admin
1. Syllabus
2. Office for Students with Disabilities (OSD)
http://www.mcgill.ca/osd/contact
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Binary:
I off = 0
I on = 1
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 10 - Decimal
I 5 = 5 × 100
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 10 - Decimal
I 5 = 5 × 100
I 25 = 2 × 101 + 5 × 100
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 10 - Decimal
I 5 = 5 × 100
I 25 = 2 × 101 + 5 × 100
I 425 = 4 × 102 + 2 × 101 + 5 × 100
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 10 - Decimal
I 5 = 5 × 100
I 25 = 2 × 101 + 5 × 100
I 425 = 4 × 102 + 2 × 101 + 5 × 100
I 3425 = 3 × 103 + 4 × 102 + 2 × 101 + 5 × 100
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 2 - Binary
I 0 = 0 × 20
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 2 - Binary
I 0 = 0 × 20
I 10 = 1 × 21 + 0 × 20
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 2 - Binary
I 0 = 0 × 20
I 10 = 1 × 21 + 0 × 20
I 110 = 1 × 22 + 1 × 21 + 0 × 20
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 2 - Binary
I 0 = 0 × 20
I 10 = 1 × 21 + 0 × 20
I 110 = 1 × 22 + 1 × 21 + 0 × 20
I 1110 = 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 2 - Binary
I 0 = 0 × 20
I 10 = 1 × 21 + 0 × 20
I 110 = 1 × 22 + 1 × 21 + 0 × 20
I 1110 = 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
I 01110 = 0 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Base 2 - Binary
I 0 = 0 × 20
I 10 = 1 × 21 + 0 × 20
I 110 = 1 × 22 + 1 × 21 + 0 × 20
I 1110 = 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
I 01110 = 0 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
I 101110 = 1 × 25 + 0 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Binary to Decimal
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Binary to Decimal
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Binary to Decimal
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Binary to Decimal
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Binary to Decimal
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
Decimal to Binary
I 6 = 3R 0
2
I 3 = 1R 1
2
I 1 = 0R 1
2
I 5310 = 110101
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
COMP-202 Week 1
Introduction Computers and Binary Scratch and Basic Programming
ASCII
Char Dec. Bin Char Dec. Bin
A 65 0100 0001 N 78 0100 1110
B 66 0100 0010 O 79 0100 1111
C 67 0100 0011 P 80 0101 0000
D 68 0100 0100 Q 81 0101 0001
E 69 0100 0101 R 82 0101 0010
F 70 0100 0110 S 83 0101 0011
G 71 0100 0111 T 84 0101 0100
H 72 0100 1000 U 85 0101 0101
I 73 0100 1001 V 86 0101 0110
J 74 0100 1010 W 87 0101 0111
K 75 0100 1011 X 88 0101 1000
L 76 0100 1100 Y 89 0101 1001
M 77 0100 1101 Z 90 0101 1010
COMP-202 Week 1