Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 - Binary Numbering System

Similar presentations


Presentation on theme: "Chapter 3 - Binary Numbering System"— Presentation transcript:

1 Chapter 3 - Binary Numbering System
CMIT100 Chapter 3 - Binary Numbering System

2 Learning Objectives Describe Numbering Systems: decimal, binary, and hexadecimal. Identify how to convert decimal to binary and binary to decimal. Describe how characters are stored in computer memory. Illustrate the use of binary in a computer with a focus on IP addresses.

3 Numbering Systems Decimal – Base 10 Binary – Base 2
Hexadecimal – Base 16

4 Base 10 System - Decimal Primary human numbering system Digits 0 – 9
Example: 1, 2, 10, 4,321

5 Base 2 System - Binary Native numbering system for digital computers
Two digits: 0, 1 Each digit is a bit that represents on or off Eight bits is a byte; also known as an octet Example of an eight bit binary number: Which equals?

6 Binary Basics Binary numbers and arithmetic let you represent any amount you want using just two digits: 0 and 1. When calculating / converting binary to decimal, we need to understand the exponent numbering system Defined: The exponent of a number says how many times to use that number in a multiplication. It is written as a small number to the right and above the base number. In this example: 82 = 8 × 8 = 64 (The exponent "2" says to use the 8 two times in a multiplication.) Other names for exponent are index or power.

7 Binary Basics In IT we need to understand how to convert Bytes (eight 1s and 0s) to decimal, and vice versa. Understanding Binary, base 2, and exponent math numbering helps us do this Each digit "1" in a binary number represents a power of two, and each "0" represents zero: For example: Binary byte: To convert think

8 Binary Basics To convert think 27 + 26 + 25 + 24 + 23 + 22 + 21 + 20
The exponents 7 through 0 represent the following decimal numbers 27 = 128 26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1 Total = 255

9 Binary Basics When you see a number like “ " you can figure out what it means by adding the powers of 2: = = 5 = = 10 = = 7

10 Binary Basics Got it? Now let’s look at a cheat sheet that can quickly be created. List the numbers: Then the binary number: If the binary number is 0, then the decimal number is zero. If the binary number is 1, then add the decimal number to the total to achieve the decimal number Adding it up: 0 64 32 4 1 101 Total

11 Binary Basics Converting from decimal to binary:
Using the cheat sheet: If the decimal number is 200 Is 200 divisible by 128 = yes = 1 200 – 128 = 72 Is 72 divisible by 64 = yes = 1 = 8 Is 8 divisible by 32 = no = 0 Is 8 divisible by 16 = no = 0 Is 8 divisible by 8 = yes = 1 8 – 8 = 0 Is 0 divisible by 4 = no = 0 Is 0 divisible by 2 = no = 0 Is 0 divisible by 1 = no = 0 200 =

12 Why Convert Binary Why do we need to do this?
This is part of understanding the subnetting networks, part of a network administrators job. Subnetting = creating multiple networks out of one (simple definition) Applying this conversion also helps with understanding IP v4 IP addressing, used on network devices (computers, printers, switches, etc.) There is a newer version of IP called IP v6 which uses the hexadecimal numbering system

13 IP v4 TCP / IP v4 properties
(screenshots from Windows Server 2008) An IP v4 address is shown as a decimal number

14 IP Address: unique 32-bit number
IP v4 IP Address: unique 32-bit number Divided into four octets separated by periods 0 reserved as placeholder referring to entire group of computers on a network 255 reserved for broadcast transmissions So you cannot use .0 or .255 as the last octet in your IP Most common way of expressing IP addresses Decimal number between 0 and 255 represents each binary octet Separated by period Example:

15 IP v4 Each number in dotted decimal address has binary equivalent Equals

16 Subnets

17 Base 16 - Hexadecimal Digits include: 0 – 9 and A – F Example: 3FA7
Not case sensitive Example: 3FA7

18 Conversions 1A6F = 0001 1010 0110 1111 = Decimal 6767 F = 15 1111
6 = A = 1 =

19 Converting between Decimal and Binary and Hexadecimal
HEX B924 = Binary = HEX 78E3 = Binary = HEX DA75 = HEX B924 = 47396 Binary = 78E3 = 30947 Binary =

20 Character Representation
American Standard Code for Information Interchange (ASCII) ASCII is an international standard for alphanumeric characters (letters and numbers), and symbols (- + & etc.) contained within a text file Essentially, all the things you could type from a standard keyboard 128 Characters Extended ASCII provides more characters 256 characters Unicode – A further extension of ASCII ASCII (American Standard Code for Information Interchange) is the most common format for text files in computers and on the Internet. In an ASCII file, each alphabetic, numeric, or special character is represented with a 7-bit binary number (a string of seven 0s or 1s). 128 possible characters are defined.

21 ASCII 7-bit 128 combinations

22 Extended ASCII 8-bit 256 combinations

23 Unicode Extended ASCII is not enough for international use
One Unicode mapping uses 16 bits per character 65363 Combinations Unicode is a superset of ASCII The first 256 characters correspond exactly to the extended ASCII character set

24 Unicode Table (Example)


Download ppt "Chapter 3 - Binary Numbering System"

Similar presentations


Ads by Google