👉 Domain Name System (DNS) operates on a hierarchical and distributed mathematical structure to efficiently translate human-readable domain names into IP addresses. At its core, DNS uses a tree-like structure where each node represents a domain or subdomain, and the path from root to leaf nodes corresponds to the DNS hierarchy. Each node is assigned a unique IP address, and the DNS math involves bitwise operations to traverse this tree. For example, when resolving a domain name to an IP address, DNS servers perform bitwise AND operations with the root node's IP address and the subdomain's prefix, progressively narrowing down the path until they reach the authoritative server holding the IP address. This process relies heavily on binary arithmetic, bit shifting, and logical operations to minimize the number of hops needed for resolution, ensuring fast and reliable domain name lookups.