Re:IPv4 addresses are silly, inet_aton(3) doubly so
by iso1631 on Wednesday November 03, 2021 @08:04AM
(#29093493)
My non-base-ten mental arithmatic isn't great, it's rare I need to do it (my typical subnets are /27 or /28, very rare I'll have a /23 or larger) so I hit alt-enter to open up a new terminal, type "bc", and job done
~$ bc
obase=256
253+10
001 007
But adding 10 to 0xfd? That involves converting 10 to 0xa, then adding to FD
~$ bc obase=256 253+10 001 007
But adding 10 to 0xfd? That involves converting 10 to 0xa, then adding to FD
~$ bc obase=16 10 A ibase=16 FD+A 107
Far more involved.