26. October 2016

Compact Encoding of Routing Prefixes

How many bits of information are contained in a routing prefix? When printed, a routing prefix commonly looks like an IP address followed by a slash and then a prefix length: or 2001:db8::/32. That should mean a minimum of 32 + ceiling(log2(32 + 1)) = 38 bits for an IPv4 prefix and 128 + ceiling(log2(128 + 1)) = 136 bits for IPv6. However, it is possible to encode a prefix in just one extra bit (for a total of 33 or 129 bits).


24. October 2016

Internals of Zabavno the x86 emulator

Zabavno (Забавно) is an x86 emulator I’ve been working on in my spare time. It translates x86 instructions into Scheme and eval’s them, which works surprisingly well.