Math Lesson Plan Computer Technician Practicum

advertisement
Math
Computer Technician Practicum
Lesson Plan
Performance Objective
Upon completion of this lesson, each student will be able to convert between different numbering
systems and correctly write mathematical formulas for use in computer programs.
Specific Objectives
 Students will explain the concept of binary.
 Students will convert numbers between binary and decimal.
 Students will explain the concept of hexadecimal.
 Students will convert numbers between hexadecimal, binary, and decimal.
 Students will solve and write equations as utilized in computer programming.
This lesson should take 10-12 class days to complete.
Preparation
TEKS Correlations
This lesson, as published, correlates to the following TEKS. Any changes/alterations to the activities may
result in the elimination of any or all of the TEKS listed.
130.275. Computer Technician Practicum
(c) Knowledge and skills.
(4) The student applies communication, mathematics, English, and science knowledge and skills to
research and develop projects. The student is expected to:
(B) demonstrate proper use of mathematics concepts as they apply to the development of
products or services; and
(C) demonstrate proper use of science principles to the development of products or services.
(5) The student knows the concepts and skills that form the basis of computer technologies. The
student is expected to:
(B) define the use of Boolean logic in computer technologies;
1
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Interdisciplinary Correlations
English
110.42(b) Knowledge and skills.
(6) Reading/word identification/vocabulary development. The student uses a variety of strategies to
read unfamiliar words and to build vocabulary. The student is expected to:
(A) expand vocabulary through wide reading, listening, and discussing; and
(B) rely on context to determine meanings of words and phrases such as figurative language,
idioms, multiple meaning words, and technical vocabulary.
(7) Reading/comprehension. The student comprehends selections using a variety of strategies. The
student is expected to:
(F) identify main ideas and their supporting details;
(G) summarize texts; and
(J) read silently with comprehension for a sustained period of time.
Speech
110.56 (b) Knowledge and skills.
(1)(A) explain the importance of communication in daily interaction;
(2)(E) participate appropriately in conversations for a variety of purposes;
(3)(A) The student uses appropriate communication in group settings;
(E) use appropriate verbal, non-verbal, and listening strategies to communicate effectively in
groups;
(5)(B) use language clearly and appropriately;
Tasks
 Students will utilize provided notes and slide presentation to complete notes pages.
 Students will complete worksheets.
Accommodations for Learning Differences
Lessons must accommodate the needs of every learner. These lessons may be modified to
accommodate your students with learning differences by referring to the files found on the Special
Populations page of this website (http://cte.unt.edu).
Preparation
 Copy the handouts.
 Have multimedia presentations ready to show the class.
Instructional Aids
 Student Notes sheet
 Student worksheets
2
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Materials Needed
 Copies
 pencils
Equipment Needed
 Teacher computer
 Projector (for slide presentation)
Introduction
Learner Preparation
 Review slides 1 - 6 of the multimedia presentation with the class (positional numbering systems specifically decimal).
Lesson Introduction
 Ask the class:
o How is data represented within a computer system?
o How would information be more readable or user friendly for programmers and
technicians?
 Tell the class that every character and command given to a computer by a user is translated into
binary before it can be “sent” to the CPU for processing.
 Explain that in-depth computer troubleshooting requires a firm understanding of numbering
systems and how to convert between the various systems.
3
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Outline
I.
NOTES TO TEACHER
OUTLINE
MI
Slides 1 – 6 Decimal Review
a. Natural numbers
b. Integers
c. Positional numbering
system
d. Number base
e. Review of exponent laws
regarding 0 and 1st power
f. Review positional
numbering system
a. Hundreds
b. Tens
c. Ones
Slides 8 – 11
Converting from binary to decimal
Extension notes are provided in the
multimedia presentation. Timeline of
delivery is at discretion of instructor.
Guidelines regarding division of
information are suggestions only.
Slides 9 – 16
Converting from decimal to binary
Upon completion of slide 16, give
students the decimal to binary
worksheet.
Slides 17 – 22
Introduction to hexadecimal
Conversion from hexadecimal to
binary
Slides 23 – 26
Conversion from decimal to
hexadecimal
Slides 27 – 37
IP Addressing and logical
operators
Upon completion of slide 11, give
students the binary to decimal
conversion worksheet.
Upon completion of slide 22, give
students the hexadecimal to binary
worksheet.
Upon completion of slide 26, give
students the decimal to hexadecimal
worksheet.
Upon completion of slide 37, give
students worksheets pertain to IP
addressing.
Multiple Intelligences Guide
Existentialist
Interpersonal
Intrapersonal
Kinesthetic/
Bodily
Logical/
Mathematical
Musical/Rhythmic
Naturalist
Verbal/Linguistic
Visual/Spatial
4
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Application
Guided Practice
Students will use the provided slide presentation to complete the notes handouts pages.
Independent Practice
 Students will complete all provided worksheets
o Binary to decimal
o Decimal to binary
o Hexadecimal to binary
o Decimal to hexadecimal
o Rewriting math for computer programs
o Using math in computer programs
Summary
Review
 Why is it important to know how to utilize math properly?
 What is the fundamental language of computers?
 Why was binary chosen as machine language?
Evaluation
Informal Evaluation:
 The teacher will check frequently for understanding.
 Very small work group option (peer tutoring).
Formal Evaluation:
 Worksheets and test over the material.
5
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Binary, Hex, and Decimal, “Oh My”!
Student Notes Handout
1.
numbers
a. Zero and any number obtained by repeatedly adding one to it
i. Ex. 0, 1, 3, 100
2. Integers
a. Any
number
i. Includes negative numbers and zero
3.
Numbering System
a. The number depends on the position of the digits to represent the number
4. Number base
a. The
(or radix) is the number of
digits used to represent
numbers in a positional numerical system.
5. Any number to the
power is equal to 1.
0
a. Example: 2 =
6. Any number to the
power is equal to that
1
a. Example: 2 = 2
.
6
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Converting from Decimal to Binary



Base
o The base of a number is indicated by a
value at the ‘end’ of the number. If
there is no subscript the base is assumed to be 10 (or decimal).
Uses
and
o Binary uses two as its base so each
is equal to two to an exponent.
o Since we are using two single characters we use
and
as our two digits.
Consider the binary number 000011102
Binary Table
Do you see how each
in value? This makes binary one of the easiest
numbering systems to convert to decimal. Using basic addition we can take any binary number and
convert it to a decimal equivalent. As long as you memorize the pattern all you have to do is
the value of the placeholders where a 1 appears.
7
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Look at the table. In the top row you notice there are only zeros and ones. This one is a little easier for
you by adding the table and colors. This is the
number we are going to convert to decimal,
.
By looking down the chart you can see that we are going to use the following values;
,
, and
because there are 1s in those placeholders. Note that red indicates which numbers we will use
to convert to a decimal value.
Using the formal method we would transfer the digits to the blue box you see on the right of the slide. I
like to use the vertical alignment to make things easier to read. We start with
, determine
that there is a zero in that placeholder.
What is the answer when you multiply any number by zero?
Answer:
Moving down the line we have zeros until we get to the place holder
This place holder has a
instead of a zero.
which is equal to
right?
What is the product of any number multiplied by one?
Answer:
number
Once you have calculated the
we add the answers together.
What is the sum of 8+4+2?
Answer:
The decimal equivalent of
of all the placeholders where a one appears
is
which is shown in the green box.
Converting from Decimal to Binary

Can be done two different ways
–
–
Long Division
Convert
from decimal to binary
Sart by
the original number by our base which is . Notice that we do not
directly divide 35 by 2 and get 16. You must divide the numbers
so that you have a
of
or
at the end of the process. Once you reach a zero or
one as the remainder you move to the next step.
8
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Using the
is dividing
we got in the first step (35 divided by 2) we move to the second step which
by 2. We
the process until we have
in the
,
, and
. Now here comes the tricky part.
Example:
1
2 37
52
1
5
1
4
8
2 1
17
6
4
2 8
8
2
2 4
4
0
0
1
2 2 2 1 2 0
0
0
2
Binary
bits
Each of the zeros and ones in the remainders represent individual
. These bits are in
order so we have to do what we call ‘
’ meaning we rewrite them
putting the
bit in the
position when we write the number in
binary format.
is flipped to
Once we rewrite the number we see that 35 in binary is 01000112 . You can always check your answer by
using the binary to decimal conversion method. Go ahead, check our math.
=
Subtraction
Convert 3710 to binary using subtraction
Looking at our binary table what is the
Answer:
number that is still less than
?
9
Copyright © Texas Education Agency, 2015. All Rights Reserved.
To indicate that 32 will be used we put a
we have
left right? What is the
Answer:
in the
placeholder. Once we subtract 32 from 37
number in our table that is still lower than 3?
Skip down to the
placeholder and put in a 1. What is the only number left that we can use that is
lower than or equal to 1?
Answer:
Now we put a
in the
placeholder.
Continue the subtraction process until we get zero as an answer.
What do you think we do with all those blank spaces in the table?
Answer:
Unlike using the division method you
representation of
=
have to flip the bits in this case so the binary
.
Hexadecimal
Characters
–
–
Hexadecimal
(Hex)
–
–
You can convert directly from hex to decimal but not from
decimal to hex.
In order to represent the numbers
–
(to give
us our 16 characters) we use letters. A = 10, B = 11, C = 12, D
= 13, E = 14, and F = 15.
Each
is equal to
(combination of zeros and ones) and like binary can be
combined to create ever larger numbers.
Binary
Decimal
0001
1
2
3
2
0011
0100
5
6
5
0110
0111
8
9
1001
B
1100
E
As with binary and decimal,
is a
Each placeholder uses
as its base and is equal to 16 to an exponent.
10
11
1101
F
7
8
1010
C
4
13
14
1111
numbering system.
10
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Look at the table.
is the hexadecimal number we are going to convert to decimal.
By looking at the chart I can see that we are going to use the following values;
, and
because there are characters in those placeholders. Note that the color red indicates which numbers we
will use to convert to a
value.
Using the formal method again and for easier reading we will
we use to the blue box on the right of the slide.
Just like converting binary once you have calculated the
character appears we the answers together.
What is the sum of 240 + 15?
Answer:
The decimal equivalent of
Decimal to Hex Conversion
Convert 5410 to Hexadecimal
is
the
of all the placeholders where a
which is shown in the green box.
11
Copyright © Texas Education Agency, 2015. All Rights Reserved.
The easiest way to convert a decimal number to hex is to go to
using the subtraction method to go from decimal to binary.
first. Let’s look at it
Convert from
to binary
Convert from
binary to
Now we know that
is equal to
in binary. Here is where we take the
next step. Remember that when we first discussed hexadecimal and looked at the hex/binary/decimal
table you learned that each hex character represents
binary bits.
Note that we have
four bits are then
the binary bits into
into a
character.
Looking first at the left-hand group of four;
Answer:
Look at the second group of four;
Answer:
of
. Each of the
, how would is that number represented in hex?
, how would you represent that number in hex?
While it looks like 5410 in hex is thirty-six it is actually read as
.
12
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Convert 12810 to Hexadecimal
Decimal to binary
Binary to
hex
IP Addressing
• Every node on a network
have a unique IP address
•
Protocol version
• Unique -bit number
– Divided into
divided by decimal points
» EX: 192.168.0.3
• Separated into
Commonly Used IPv4 Classes
Class
First Octet
Shared
Octets
1 – 126
1
16,777,214
2
65,534
B
C
•
192 – 223
Number of
Networks
Maximum
Addressable Hosts
> 2,000,000
Highest decimal number an octet may be is
13
Copyright © Texas Education Agency, 2015. All Rights Reserved.
•
– Each octet is equal to
• 111111112 =
10
• Running out of IPv4 addresses due to 32-bit limitation
Combined with a ‘
’ to increase number of addressable nodes on a
network
Subnet Mask
Class
First Octet
Default Subnet Mask
1 – 126
255.0.0.0
B
C
Ipv6
•
255.255.0.0
192 – 223
Composed of
bits
– Eight
fields
• Represented by hexadecimal numbers
– Divided into groups of
characters
» EX: FEE3:00FF:003D:0000:0000:0000:3015:AABC
– Multiple fields with zero values can be abbreviated
» EX:
» EX:
Maximum number of IPv4 addresses is: 232 or roughly
provides us with 3.4 x 1038 or 340 decillion addresses
addresses whereas
Assigning IP Addresses
• Can be done manually or by DHCP (Dynamic Host Configuration Protocol)
–
IP address
•
assigned
• Does not change
• Human error in duplicating addresses can cause
issues
–
IP addressing
• Assigned
by a
server
• Most common and simplest method
14
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Boolean Operators
Because of some of the programs you write we also need to discuss the
in computer programming. These operators have their own
, and have a specific
of operation.
or Boolean operators
, fit into
Boolean/Logic (or bool) Operators
a. Also called
Operators or just
b. Logical operators that
or
a.
= false
b.
= true
c. Three basic bool operators
a.
=
–
arguments must be true for the statement to return True
b.
=
–
argument may be
for the statement to return True
c.
=
–
the statement to
if it returns
and
it returns
d. Order of operations – as with PEMDAS
groups are evaluated
and
operators are evaluated in the following order
a.
b.
c.
d.
e.
f.
g.
if
15
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Truth Tables
These are truth tables.
tables help us to visualize all possible results of
or
comparisons. The results of AND and NOTAND are in the blue tables while the results of
OR and NOTOR are in the green tables.
Truth tables help us step through our program code and determine if our
ANDING
 Every IP address has a default
o Class A –
o Class B –
o Class C –
 In order to locate a specific node on the network a computer must
appropriate
in
 Based on our truth tables we should know the following
o 1 AND 1 =
o 1 AND 0 =
o 0 AND 1 =
o 0 AND 0 =
is sound.
the IP address with the
16
Copyright © Texas Education Agency, 2015. All Rights Reserved.
EXAMPLE:
IP address: 192.168.0.10
Subnet mask: 255.255.255.0
First we convert both to
IP address:
Subnet Mask:
AND:
The result of ANDing is the
:
(192.168.0.10)
(255.255.255.0)
(192.168.0.0)
address.
17
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Binary, Hex, and Decimal Oh My
Student Notes Handout
a. Natural numbers
a. Zero and any number obtained by repeatedly adding one to it
a. Ex. 0, 1, 3, 100
b. Integers
a. Any whole number
a. Includes negative numbers and zero
c. Positional Numbering System
a. The number depends on the position of the digits to represent the number.
d. Number base
a. The base (or radix) is the number of single digits used to represent numbers in a positional
numerical system.
Any number to the 0 power is equal to 1.
Example: 20 = 1
Any number to the 1st power is equal to that number.
Example: 21 = 2
2
7 * 10 = 7 * 100 = 700
1
2 * 10 = 4 * 10 = + 20
0
5 * 10 = 5 * 1 = + 5
725
18
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Converting from Decimal to Binary
•
•
•
•
•
Base 2
The base of a number is indicated by a subscript value at the ‘end’ of the number. If there is no
subscript the base is assumed to be 10 (or decimal).
Uses 0 and 1
Binary uses two as its base so each placeholder is equal to two to an exponent.
Since we are using two single characters we use zero and one as our two digits.
This is where binary digits (0s and 1s) go
Do you see how each placeholder doubles in value? This makes binary one of the easiest numbering
systems to convert to decimal. Using basic addition we can take any binary number and convert it to a
decimal equivalent. As long as you memorize the pattern all you have to do is add the value of the
placeholders where a 1 appears.
Convert 00011102 from binary to decimal
19
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Look at the table. In the top row you notice there are only have zeros and ones. This one is a little easier
for you by adding the table and colors. This is the binary number we are going to convert to decimal,
00001110.
By looking down the chart you can see that we are going to use the following values; 23, 22, and 21
because there are 1s in those placeholders. Note that red indicates which numbers we will use to
convert to a decimal value.
Using the formal method we would transfer the digits to the blue box on the right. The vertical
alignment makes things easier to read. We start with 128, determine that there is a zero in that
placeholder.
What is the answer when you multiply any number by zero?
Answer: zero
3
Moving down the line we have zeros until we get to the place holder 2 which is equal to 8 right? This
place holder has a one instead of a zero. What is the product of any number multiplied by one?
Answer: That number
Once you have calculated the products of all the placeholders where a one appears we add the answers
together. What is the sum of 8+4+2?
Answer: 14
The decimal equivalent of 000011102 is 14 which is shown in the green box.
Converting from Decimal to Binary
• Can be done two different ways
– Long division
– Subtraction
Long Division
Convert 3510 from decimal to binary
Start by dividing the original number by our base which is 2. Notice that we do not directly divide 25 by 2
and get 16. You must divide the numbers individually so that you have a remainder of zero or one at the
end of the process. Once you reach a zero or one as the remainder you move to the next step.
Using the quotient we got in the first step (35 divided by 2) we move to the second step which is dividing
17 by 2. We repeat the process until we have zero in the quotient, dividend, and remainder. Now here
comes the tricky part.
20
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Example:
1
2 37
52
1
5
11
4
8
2 1
17
6
1
4
2 8
8
2
2 4
4
0
0
0
0
1
2 2 2 1 2 0
0
0
2
0
1
0
Binary
bits
Each of the zeros and ones in the remainders represent individual bits. These bits are in reverse order so
we have to do what we call ‘flipping the bits’ meaning we rewrite them putting the rightmost bit in the
leftmost position when we write the number in binary format.
1100010 is flipped to 0100011
Once we rewrite the number we see that 35 in binary is 01000112 . You can always check your answer by
using the binary to decimal conversion method. Go ahead, check our math.
0100011 = 35
2
10
Subtraction
Convert 3710 to binary using subtraction
Looking at our binary table what is the highest number that is still less than 37?
Answer: 32
To indicate that 32 will be used we put a 1 in the 25 placeholder. Once we subtract 32 from 37 we have 3
left right? What is the highest number in our table that is still lower than 3?
Answer: 2
21
Copyright © Texas Education Agency, 2015. All Rights Reserved.
1
Skip down to the 2 placeholder and put in a 1. What is the only number left that we can use that is
lower than or equal to 1?
Answer: 1
0
Now we put a 1 in the 2 placeholder.
Continue the subtraction process until we get zero as an answer.
What do you think we do with all those blank spaces in the table?
Answer: Fill them with zeros because they are not used.
Unlike using the division method you do not have to flip the bits in this case so the binary representation
of 3710 = 001000112.
Hexadecimal
Characters
– 0–9
– A–F
You can convert directly from hex to decimal but not from
decimal to hex.
In order to represent the numbers 10 – 15 (to give us our 16
characters) we use letters. A = 10, B = 11, C = 12, D = 13, E =
14, and F = 15.
Each character is equal to four bits (combination of zeros
and ones) and like binary can be combined to create ever
larger numbers.
Hexadecimal
(Hex)
Binary
Decimal
1
0001
1
2
0010
2
3
0011
3
4
0100
4
5
0101
5
6
0110
6
7
0111
7
8
1000
8
9
1001
9
A
1010
10
B
1011
11
C
1100
12
D
1101
13
E
1110
14
F
1111
15
22
Copyright © Texas Education Agency, 2015. All Rights Reserved.
As with binary and decimal, hexadecimal is a positional numbering system. Each placeholder uses 16 as
its
base and is equal to 16 to an exponent.
Look at the table. FF is the hexadecimal number we are going to convert to decimal.
1
0
By looking down the chart, I can see that we are going to use the following values; 16 , and 16 because
there are characters in those placeholders. Note that I have used the color red to indicate which
numbers we will use to convert to a decimal value.
Using the formal method again and for easier reading, we will transfer the digits we use to the blue box
on the right of the slide.
Just like converting binary once you have calculated the products of all the placeholders where a
character appears we add the answers together.
What is the sum of 240 + 15?
Answer: 255
The decimal equivalent of FF16 is 255 which is shown in the green box.
Decimal to Hex Conversion
23
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Convert 5410 to Hexadecimal
The easiest way to convert a decimal number to hex is to go to binary first. Let’s look at it using the
subtraction method to go from decimal to binary.
Convert from decimal to
binary
Convert from
binary to hex
Now we know that 5410 is equal to 00110110 in binary. Here is where we take the next step. Remember
that when we first discussed hexadecimal and when we looked at the hex - binary - decimal table you
learned that each hex character represents four binary bits.
Note that we have divided the binary bits into groups of four. Each of the four bits are then translated
into a hex character.
Looking first at the left-hand group of four; 0011, how would you represent that number in hex?
Answer: 3
Look at the second group of four; 0110, how would you represent that number in hex?
Answer: 6
While it looks like 5410 in hex is thirty-six it is actually read as three six.
24
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Convert 12810 to Hexadecimal
IP Addressing
• Every node on a network must have a unique IP address
• Internet Protocol version 4
• Unique 32-bit number
– Divided into four octets divided by decimal points
» EX: 192.168.0.3
• Separated into classes
Commonly Used IPv4 Classes
•
Class
First Octet
Shared
Octets
Number of
Networks
Maximum
Addressable Hosts
A
1 – 126
1
126
16,777,214
B
128 – 191
2
> 16,000
65,534
C
192 – 223
3
> 2,000,000
254
Highest decimal number an octet may be is 255
25
Copyright © Texas Education Agency, 2015. All Rights Reserved.
•
– Each octet is equal to eight binary bits
• 111111112 = 25510
• Running out of IPv4 addresses due to 32-bit limitation
Combined with a ‘subnet mask’ to increase number of addressable nodes on a network
Subnet Mask
Ipv6
•
Class
First Octet
Default Subnet Mask
A
1 – 126
255.0.0.0
B
128 - 191
255.255.0.0
C
192 – 223
255.255.255.0
Composed of 128 bits
– Eight 16-bit fields
• Represented by hexadecimal numbers
– Divided into groups of four hexadecimal characters
» EX: FEE3:00FF:003D:0000:0000:0000:3015:AABC
– Multiple fields with zero values can be abbreviated
» EX: 00EE = EE
» EX: 0000 = 0
Maximum number of IPv4 addresses is: 232 or roughly 4 billion addresses whereas Ipv6 provides us with
3.4 x 1038 or 340 decillion addresses
Assigning IP Addresses
• Can be done manually or by DHCP (Dynamic Host Configuration Protocol)
– Static IP address
• Manually assigned
• Does not change
• Human error in duplicating addresses can cause connection issues
– Dynamic IP addressing
• Assigned automatically by a DHCP server
• Most common and simplest method
Boolean Operators
26
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Because of some of the programs you will write we need to discuss the logical or Boolean operators in
computer programming. These operators have their own symbols, fit into PEMDAS, and have a specific
order of operations.
a. Also called Logical Operators or just bool
b. Logical operators that return true or false
a. 0 = false
b. 1 = true
c. Three basic bool operators
a. andand - AND: both arguments must be true for the statement to return True.
b. || - OR: either argument may be true for the statement to return True.
c. ! – NOT: toggles the statement to False if it returns True and True if it returns False.
d. Order of operations – As with PEMDAS parenthetical groups are evaluated first operators are
evaluated in the following order.
a. NOT (!)
b. Multiplication/division (*, /)
c. Addition/subtraction (+, -)
d. Relational operators (<, <=, >, >=)
e. NOT Equal (!=)
f. AND (andand)
g. OR (||)
27
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Truth Tables
These are truth tables. Truth tables help us to visualize all possible results of Boolean or logical
comparisons. The results of AND and NOTAND are in the blue tables while the results of OR and NOTOR
are in the green tables.
Truth tables help us step through our program code and determine if our logic is sound and rational.
ANDING
 Every IP address has a default subnet mask
o Class A – 255.0.0.0
o Class B – 255.255.0.0
o Class C – 255.255.255.0
 In order to locate a specific node on the network a computer must AND the IP address with the
appropriate subnet mask in binary
 Based on our truth tables we should know the following
o 1 AND 1 = 1
o 1 AND 0 = 0
o 0 AND 1 = 0
o 0 AND 0 = 0
28
Copyright © Texas Education Agency, 2015. All Rights Reserved.
EXAMPLE:
IP address: 192.168.0.10
Subnet mask: 255.255.255.0
First we convert both to binary:
IP address: 11000000.10101000.00000000.00001010 (192.168.0.10)
Subnet Mask: 11111111.11111111.11111111.00000000 (255.255.255.0)
AND: 11000000.10101000.00000000.00000000 (192.168.0.0)
The result of ANDing is the network address.
29
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Binary to Decimal Worksheet
Convert the following numbers from binary to decimal.
Please show your work. Do not use electronic devices.
a. 10101001
f. 00101000
b. 00110010
g. 00011000
c. 00111100
h. 10011001
d. 11101100
i.
11111111
e. 00001000
j.
01100000
30
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Binary to Decimal Worksheet KEY
Convert the following numbers from binary to decimal.
Please show your work. Do not use electronic devices.
1. 10101001 - 169
6. 01001000 - 72
2. 00110010 - 50
7. 00011000 - 24
3. 00100100 - 36
8. 10011001 - 153
4. 11101100 - 236
9. 11111111 - 255
5. 00001000 - 8
10. 01100000 - 69
31
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Decimal to Binary Worksheet
Convert the following decimal numbers to binary. For the first five you may use the subtraction method.
For the second five you must use the long division method. You must show all work. No electronic
devices are allowed.
Please use a separate sheet of paper.
1. 192
2. 168
3. 253
4. 169
5. 17
6. 25
7. 173
8. 127
9. 5
10. 39
32
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Decimal to Binary Worksheet KEY
Convert the following decimal numbers to binary. For the first five you may use the subtraction method.
For the second five you must use the long division method. You must show all work. No electronic
devices are allowed.
Please use a separate sheet of paper.
1. 192
= 11000000
2. 168
= 10100100
3. 253
= 11111101
4. 169
= 10101001
5. 17
= 00010001
6. 25
= 00011001
7. 173
= 10101101
8. 127
= 01111111
9. 5
= 00001001
10. 39
= 00100111
33
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Hexadecimal to Decimal Conversion
You will need to convert the numbers below from hexadecimal to decimal format.
Please do not use a calculator (or any other electronic device) and show all work.
1. 0216
6. E116
2. 3016
7. 8016
3. 1016
8. AB16
4. 0F16
9. C116
5. F016
10.0D16
34
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Hexadecimal to Decimal Conversion KEY
You will need to convert the numbers below from hexadecimal to decimal format.
Please do not use a calculator (or any other electronic device) and show all work.
1.
0216 = 210
2.
3016 = 4810
3.
1016 = 1610
4.
0F16 = 1510
5.
F016 = 24010
6.
E116 = 22510
7.
8016 = 12810
8.
AB16 = 17110
9.
C116 = 19310
10.
0D16 = 1310
35
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Binary to Hexadecimal Conversions
Convert the following numbers from binary to hexadecimal.
Please show your work.
Do not use electronic devices.
1. 10101001
6. 00101000
2. 00110010
7. 00011000
3. 00111100
8. 10011001
4. 11101100
9. 11111111
5. 00001000
10. 01100000
36
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Binary to Hexadecimal Conversions KEY
Convert the following numbers from binary to hexadecimal.
Please show your work.
Do not use electronic devices.
1.
10101001 = A916
2.
00110010 = 3216
3.
00111100 = 3C16
4.
11101100 = EC16
5.
00001000 = 0816
6.
00101000 = 2916
7.
00011000 = 1816
8.
10011001 = 9916
9.
11111111 = FF16
10.
01100000 = 6016
37
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Decimal to Hexadecimal Conversions
Convert the numbers below from decimal to hexadecimal.
Please show all your work and do not use electronic devices.
1. 255
6. 172
2. 33
7. 89
3. 26
8. 64
4. 51
9. 22
5. 169
10. 47
38
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Decimal to Hexadecimal Conversions KEY
Convert the numbers below from decimal to hexadecimal.
Please show all your work and do not use electronic devices.
1.
255
= FF16
2.
33
= 2116
3.
26
= 1A16
4.
51
= 3316
5.
169
= A916
6.
172
= AC16
7.
89
= 5916
8.
64
= 4016
9.
22
= 1616
10.
47
= 2F16
39
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Converting IP Addresses
Convert the IP addresses below from decimal to binary or binary to decimal as appropriate.
Each octet in an IP address is considered its own eight-bit number.
1.
10.250.1.1
2.
150.10.15.0
3.
220.200.23.1
4.
177.100.18.4
5.
6.
117.89.56.45
11111111.00000111.11110000.11110000
7.
00001111.11001010.10100000.00001010
8.
00111111.01100110.00010001.00000000
9.
01110111.11101110.10000001.00110001
10.
11110110.10010010.00010001.00100000
40
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Converting IP Addresses KEY
Convert the IP addresses below from decimal to binary or binary to decimal as appropriate.
Each octet in an IP address is considered its own eight-bit number.
1.
10.250.1.1
00001010.11111010.00000001.00000001
2.
150.10.15.0
10010110.00001010.00001111.00000000
3.
220.200.23.1
11011100.11001000.00010111.00000001
4.
177.100.18.4
10110001.01100100.00010010.00000100
5.
117.89.56.45
01110101.01011001.00111000.00101101
6.
11111111.00000111.11110000.11110000
255.7.240.240
7.
00001111.11001010.10100000.00001010
15.202.160.10
8.
00111111.01100110.00010001.00000000
63.102.17.0
9.
01110111.11101110.10000001.00110001
119.238.129.49
10.
11110110.10010010.00010001.00100000
246.146.17.32
41
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Address Class Identification
Identify the address class for each IP address.
Address
1.
10.250.1.0
2.
148.15.2.0
3.
162.0.10.5
4.
192.0.15.2
5.
220.220.3.1
6.
119.18.42.0
7.
33.1.250.6
8.
110.5.128.200
9.
219.50.119.62
10.
95.100.168.255
11.
123.103.46.255
12.
11.250.10.1
13.
199.155.77.56
14.
215.45.49.128
15.
100.25.1.16
16.
125.148.17.9
17.
55.255.0.19
18.
188.10.18.2
19.
28.10.10.10
20.
200.116.132.15
Class
42
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Address Class Identification KEY
Address
Class
1.
10.250.1.0
A
2.
148.15.2.0
B
3.
162.0.10.5
B
4.
192.0.15.2
C
5.
220.220.3.1
C
6.
119.18.42.0
A
7.
33.1.250.6
A
8.
110.5.128.200
A
9.
219.50.119.62
C
10.
95.100.168.255
A
11.
123.103.46.255
A
12.
11.250.10.1
A
13.
199.155.77.56
C
14.
215.45.49.128
C
15.
100.25.1.16
A
16.
125.148.17.9
A
17.
55.255.0.19
A
18.
188.10.18.2
C
19.
28.10.10.10
A
20.
200.116.132.15
C
Identify the address class for each
IP address.
43
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Numbering Conversions Test
1.
Convert the following from binary to decimal:
a. 110000112 =
b. 111100102 =
c. 100100102 =
2.
Convert the following from decimal to binary:
a. 25410 =
b. 12810 =
c. 3310 =
3.
Convert the following from hexadecimal to decimal:
a. F216 =
b. 1D16 =
c. 5016 =
4.
Convert the following from decimal to hexadecimal:
a. 25610 =
b. 8910 =
c. 2210 =
5.
Convert the following from binary to hexadecimal:
a. 110011002 =
b. 111100002 =
c. 001111002 =
6.
Convert the following IP addresses as indicated:
a. 168.5.22.3 =
b. 11000000.0110100.00001010 =
7.
AND the IP addresses below with their default subnet mask to determine the network
address:
a. 192.168.15.20
b. 255.255.255.0
c. AND
d. Network address
44
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Numbering Conversions Test KEY
1.
Convert the following from binary to decimal:
a. 110000112 = 19510
b. 111100102 = 24210
c. 100100102 = 14610
2.
Convert the following from decimal to binary:
a. 25410 = 111111102
b. 12810 = 100000002
c. 3310 = 001000012
3.
Convert the following from hexadecimal to decimal:
a. F216 = 24210
b. 1D16 = 2910
c. 5016 = 8010
4.
Convert the following from decimal to hexadecimal:
a. 25610 = 10016
b. 8910 = 5916
c. 2210 = 1616
5.
Convert the following from binary to hexadecimal:
a. 110011002 = CC16
b. 111100002 = F016
c. 001111002 = 3C16
6.
Convert the following IP addresses as indicated:
a. 168.5.22.3 = 10101000.00000101.00010110.00000011
b. 11000000.0110100.00001010 = 192.100.10.33
7.
AND the IP addresses below with their default subnet mask to determine the network
address:
a. 192.168.15.20 – 11000000.10101000.00001111.00010100
b. 255.255.255.0 – 11111111.11111111.11111111.00000000
c. AND - 11000000.10101000.00001111.00000000
d. Network address: 192.168.15.0
45
Copyright © Texas Education Agency, 2015. All Rights Reserved.
Download