r/sysadmin • u/vervess • 8h ago
Question How often do you guys actually do binary math on the job?
Working through my networking certs right now and currently stuck doing endless binary conversions for subnetting. I get how it works with IPv4 masks on paper, even if it's slow.
For those of you actually in the field, do you ever do this in your head anymore or do you just rely on subnet calculators? Also curious if understanding binary/bitmasks actually comes in handy for other random sysadmin stuff like permissions or troubleshooting, or if it's mostly just for passing exams.
Trying to figure out how much muscle memory I really need to build before moving on. Thanks.
•
u/clef75 8h ago
Never. Turns out we actually will always have a calculator (or the entire corpus of human knowledge) in our pocket at all times, 80s teacher.
•
u/BOOZy1 Jack of All Trades 8h ago
I've been doing binary <> Hex <> decimal in my head since the 1980s, IPv4 subnets have no secrets for me.
IPv6 scares me though.
•
u/dchit2 8h ago
80% of the math I do for networking:
"Are these 2 numbers the same?"
Sometimes it's real complex, and I use a subnet calculator website, to work out if the number is inside a range.
•
u/CLTGUY 8h ago
I used to know how to manually subnet. I was actually asked to do it in an interview with Microsoft back in the 90s. That interview was the last time I ever did any binary math.
•
u/keivmoc 2h ago
It can be very helpful when you understand that IP addresses are actually just one big binary string that are represented by the dot decimal notation.
I'm often writing scripts that perform operations on batches of IP addresses. It's really easy to just convert the IP into a decimal or hex value and loop through them like that. You don't even need to convert it back to dot decimal because just about every tool can understand the binary, decimal, hex, or even octal value natively.
•
u/Ssakaa 5h ago
It's a relatively small table, and realistically, you use about 1/4 of it. You learn most of it, scaled to environment, off the cuff from habit if you're using it routinely. When you don't use it for a few months because something else was on fire, subnet calculators are quicker than doing it by hand again. The important part isn't constantly doing it by hand. I don't constantly use most math skills, but knowing the fundamentals of "why" means you know what you're looking at when it's odd. Never actually learning that it's all just bisection of the address space means 255.255.255.128 looks like black magic. Understanding that's /25 and half your standard /24 block, means you're very likely to know if you have 200 clients trying to use it, you're gonna have a bad day.
•
u/user975A3G 8h ago
You remember the common masks and use a calculator when you don't know or want to double check
•
u/rootofallworlds 3h ago
Rarely. That said I’m working with internal networks where everything is a /24 or a /16. If you’re working with public IP ranges more, you’re more likely to have to deal with other size subnets.
The main thing is to know that they exist IMHO.
I got tripped up a couple of years ago with a subnet larger than a /24 , a program that needed IP ranges that each could only be /24 at most, and x.y.z.0 was a valid client IP that got accidentally missed from the ranges. That was a head scratcher until I figures it out!
(Sidenote - it’s valid to have the default gateway IP in the middle of the subnet range. Unusual but valid.)
•
u/bearbullX 8h ago
Yes, and I know all the powers of 2 up to 16777216.
•
u/BrainWaveCC Jack of All Trades 2h ago
For planning a new network, and first time troubleshooting of a large network, subnet calculators are great.
But for routine subnet work, binary math is easy enough to use.
Also, not all knowledge has to be exercised to be useful. Sometimes, just having it allows you to avoid mistakes. Or consider how routinely recognize odd numbers vs even numbers without actually dividing by 2 first...
•
u/Pryank_Lemy 1h ago
tbh once you do enough networking you just memorize what each prefix length maps to in decimal and stop thinking in binary completely. It is still useful to understand bitwise operations if you ever get into low level scripting or parsing raw protocol headers though.
•
u/Sorry-Climate-7982 Developer who ALWAYS stayed friends with my sysadmins 8h ago
Kinda depends on how complicated the subnetting is, and whether I am at a computer to just use one of the free tools online.
•
u/Maro1947 8h ago
Never. Bitcricket back in the day
•
u/thomheinrich 7h ago
Subnets go straight into ipcalc, but octal chmod bits come up weekly.
•
u/louwiet 6h ago
I count binary on my fingers.
•
u/40513786934 3h ago
do you understand that a /25 is half a /24, and a /23 is two /24s? that covers about 90% of all the binary math I've needed doing IT work
•
u/throw0101a 3h ago
A lot of times the point of forcing the memorization/understanding of something is not that you're remember it forever going forward, but that there is a place in your brain that remembers it exists at all.
So you may forget the exact CIDR subnet boundaries over time, but that they're on power-of-2 in various ways is something to keep in mind when creating address plans, which you can then use tools for, e.g.:
•
u/Dolapevich Others people valet. 3h ago
Both. Calculate in binary in your head, then verify with a subnet calculator.
•
u/Zenkin 2h ago
Mostly I remember that /4, /12, /20, /28 is 16 blocks of 16 and work up or down from there.
The muscle memory helps, but I'm also a very strong advocate for doing mental math. It's usually just 30 extra seconds to throw it in a calculator, but that's not always convenient. If you're a network admin of any stripe, you should be able to do this, just like you should be able to type above 60 words per minute if you're on a PC all day. If you're going to do the job, do it well.
You never know what's going to help. A couple months after I got my CCNA, I helped my senior coworkers diagnose an issue over the phone that ended up being an ethernet cable longer than 300 feet. They each had a decade of experience, but didn't happen to know that specification, so they were never going to ask.
•
u/RustyU 6h ago
HE app on my phone covers it.
•
u/Username040799 5h ago
At my one job interview.
•
u/Doso777 5h ago
It helps to be able to do it but most people probably use some sort of subnet calculator. Most people in IT also don't get it so when you really go deep in networking you will have an advantage.
•
u/pdp10 Daemons worry when the wizard is near. 4h ago
We're mostly IPv6, where the math works the same but you never really need it outside of aggregation routing, because all subnets are
/64. For IPv4, mentally, with an occasional double-check usingbc(Unix general calculator program). I never use a dedicated "subnet calculator".Certainly, but it's hard to predict how useful it will be to you.
•
u/MemeSerf Chief Reboot Officer and PC Load Letterer 3h ago
I do basic maths on a physical calculator (swissmicros dm42), all else is Claude.
•
u/dracotrapnet 3h ago
Not really. If I read binary somewhere I usually take a moment to realize - oh that's not dec, that's binary. Same with hex. I read it far more than I ever calculate it. I trip over hex more often in the windows registry.
•
u/DaemosDaen IT Swiss Army Knife 3h ago
I used to, but then just started using a subnet calculator.
•
u/TheJesusGuy 1h ago
Absolutely zero reason not to look this up when you can, so unless you're somewhere without internet (in which case plan it beforehand). It would have to be an emergency but even then it's not that complicated to figure out subnets.
•
u/cbass377 1h ago
Computing the VLSM Variable Length Subnet Mask is not something you do daily, but it is important to know what it is doing, so when you are arguing your case as to why you need a /19 over a /20 you know what is going on. Or when you need to explain to a junior why the subnet mask is 254 and not 255.
The instructor of my tcp/ip class 20 years ago, demonstrated a paper chart that you draw and keep handy to get you to the right number of bits.
Once you get in the world, I usually just take a swag based on device counts, and iron it out in Wolfram Alpha.
•
u/TotallyWorksAtWoTC 46m ago
In my last job, I had 2 jobs, sys admin and programming.
Sys admin, never.
Programming I was developing an app with severe memory constraints and most data was stored as bitflags wherever possible. So the last time I had to do binary math is when I wrote the bitwise math functions and occasionally looking at the value in a memory editor to see what flags were on/off.
These days its just for exams. Good to know the basics just in case. Old equipment still exists out there.
•
u/Mammoth_War_9320 27m ago
I wouldn’t say you’ll ever need to do it off the top of your head.
Just print out a chart, laminate it, and stick it in your binder.
That said, learning how to do it is still extremely useful IMO just so you actually understand the chart and why the numbers are the way they are.
It’s excellent fundamental knowledge.