180 likes | 297 Views
Binary Lesson 5 Counting. Powers of 2. One bit has 2 possible values (2^1) 0 or 1 Two bits have 4 possible values (2^2) 00 01 11 10 Three bits have 8 values (2^3) 000 001 010 011 100 101 110 111 Four bits have 16 values (2^4) 0000 0001 ... 1110 1111. A Byte.
E N D
Powers of 2 • One bit has 2 possible values (2^1) • 0 or 1 • Two bits have 4 possible values (2^2) • 00 01 11 10 • Three bits have 8 values (2^3) • 000 001 010 011 100 101 110 111 • Four bits have 16 values (2^4) • 0000 0001 ... 1110 1111
A Byte 8 bits, from 0000000 to 11111111 2^8 combinations 2x2x2x2x2x2x2x2 = 256 In Hex, 00 to FF 16 x 16 = 256 2^8 = 2^4 x 2^4
A Word – 16 Bits 0000 to FFFF 2^16 values = 65,536 2^16 = 2^8 x 2^8 = 256 x 256 2^16 = 2^4 x 2^4 x 2^4 x 2^4 = 16 x 16 x 16 x 16
The Easy Way 2^10 = 1,024, written as 1 K So 16 bits have 2^16 values 2^16 = 2^6 x 2^10 = 2^6 K = 64 K Approximately 64,000
32 Bits Range of values from 0000:0000 to FFFF:FFFF 2^32 values 2^2 x 2^10 x 2^10 x 2^10 4 K K K = 4 K M = 4 G Approximately 4,000,000,000
64 Bits 0000:0000:0000:0000 to 1111:1111:1111:1111 2^64 2^4 x 2^10 x 2^10 x 2^10 x 2^10 x 2^10 x 2^10 16 K K K K K K = 16 G G Approximately 16,000,000,000,000,000,000
128 Bits • The entire IPv6 address space, from • 0000:0000:0000:0000:0000:0000:0000:0000 • to • ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff • 2^128 = 2^8 x 2^120 • 2^8 x 2^30 x 2^30 x 2^30 x 2^30 • 256 G G G G • Approximately • 256,000,000,000,000,000,000,000,000,000,000,000,000
Slash Notation • fe80::/64 means 64 bits are fixed, so 64 bits vary • 2^64 addresses • fe80::/16 means 16 bits are fixed, so 112 bits vary • 2^112 addresses • 2620:1:b::/48 means 48 bits are fixed, so 80 bits vary • 2^80 addresses
How many different nybbles are there?1 nybble has 4 bits 2 4 16 256 65536
How many different bytes are there?1 byte has 8 bits 16 256 65,536 16,000,000 4,000,000,000
How many different words are there?1 word has 16 bitsAn approximate value is OK 256 64,000 16,000,000 4,000,000,000 1,000,000,000,000
How many addresses are in this range?ff02::/112(An approximate answer is OK) 1 256 64,000 16,000,000 4,000,000,000
How many addresses are in this range?ff02::/96(An approximate answer is OK) 64,000 4,000,000,000 256,000,000,000,000 16,000,000,000,000,000,000 64,000,000,000,000,000,000,000,000,000
How many addresses are in this range?2610:1:b::/64(An approximate answer is OK) 64,000 4,000,000,000 256,000,000,000,000 16,000,000,000,000,000,000 64,000,000,000,000,000,000,000,000,000
How many addresses are in this range?2610:1:b::/48(An approximate answer is OK) 64,000 4,000,000,000 256,000,000,000,000 16,000,000,000,000,000,000 64,000,000,000,000,000,000,000,000,000
How many /64 subnets are in a /48 address allocation?(An approximate answer is OK) 16 256 64,000 4,000,000,000 256,000,000,000,000