## Q: Find all combinations of IP address from a string of numbers.

### FYI,

#### IP Address

- We are looking at IPv4 which is 32 bit long, represented by 4 numbers ranging from - to 255 in 4 dots
- 0.0.0.0 (in number) === 00000000.00000000.00000000.00000000 (in bits) = 8bits.8bits.8bits.8bits = 1byte.1byte.1byte.1byte
- 8bit = 0 to 255 = 256 numbers in each part
- IP address ranges from 0.0.0.0 to 255.255.255.255
- 32 bits IP address means 256^4 = 4.3 billion IP addresses in the world. woah
- IPv6 has 128bits which means 340 trillion trillion trillion IP addresses. woah woah

#### Bit

- Bit = Binary Digit
- 1 bit = smallest unit of data in a computer
- 8 bits = 1 byte = 00000000 (in bits, 8 zeros, 2^8 numbers = 256, 0 - 255)
- n bits = 2^n ways the bits can be arranged = 0…n-1 (in binary) = 0 - 2^n -1 (in number)
- unsigned number means only positive integers; 0 - 2^n -1
- signed number means positive and negative integers; -2^n to 2^n - 1

#### Sample example,

Given a string: ‘1 2 3 4 5’,

Number of combinations:

1.2.3.4

1.2.3.45

1.2.3.5

1.2.34.5

1.2.4.5

1.23.4.5

1.3.4.5

12.3.4.5

2.3.4.5

Find pattern

Finding…

Solution

1 | Solutioning... |

NOTE: THIS IS AN ONGOING THINKING PROCESS. CHECK BACK LATER.