IPv4 to binary
A prefix length is simply a count of leading bits. A /26 fixes the first 26 bits and leaves 6 free, giving 64 addresses. In dotted-quad that boundary looks arbitrary — 255.255.255.192 — but in binary it is obvious: 26 ones followed by 6 zeros. Every subnetting rule becomes clear once the address is written as bits, which is why it is always taught this way.
Each octet becomes eight bits, giving 32 in total. 10.20.30.40 is 00001010 00010100 00011110 00101000. Subnet prefixes count leading bits, which is why binary is the form subnetting is taught in.
How to convert an IP to binary
Reading the binary makes the private ranges recognisable. Anything starting 00001010 is 10.x — a full class-A private block. Anything starting 110000001010 1000 is 192.168.x. And 10101100 0001 followed by four variable bits is the 172.16–172.31 range, which is the one people misremember, because its boundary sits inside an octet rather than on it.
Questions
Thirty-two — four octets of eight bits each.