# Exercise 1 — Reading and Converting Addresses

## Scenario

Your team is migrating a service to dual-stack (IPv4 + IPv6), and you keep getting handed addresses in different forms. Before writing any code, you need to be fluent in reading and converting them by hand.

## Deliverables

1. **Binary conversion.** Convert `10.20.30.40` to its full 32-bit binary representation, showing each octet separately (like the theory file's worked example). Then convert the binary value `11000000.10101000.00000000.00000001` back to dotted-decimal.

2. **IPv6 compression, both directions.**
   - Compress this address using both compression rules from the theory file, showing each step: `2001:0db8:0000:0042:0000:0000:0000:0001`
   - Expand this compressed address back to its full, uncompressed 8-group form: `fe80::1`
   - Explain, in your own words, why `2001:db8::1::2` is invalid syntax (reference the specific rule it breaks).

3. **Classify each address.** For each address below, state whether it is: a public IPv4 address, a private IPv4 address (and which RFC 1918 range), IPv4 loopback, IPv6 loopback, IPv6 link-local, or IPv6 global unicast. Justify each with the specific range/rule from the theory file, not just a guess.
   - `172.20.5.1`
   - `8.8.8.8`
   - `127.0.0.1`
   - `fe80::a1b2:c3d4`
   - `::1`
   - `2001:4860:4860::8888`
   - `192.168.50.200`

4. **Why it matters.** Your service just received a connection from address `10.0.0.5`. Explain why you cannot simply "reply to it" the way you'd reply to a public address reaching you over the internet — what has to be true about the network topology for that address to even make sense as a source.

## Notes

- Show your work for the binary conversions — don't just state the final answer.
