Each digit of the
squawk code can be set to a number from 0 to 7. This is because the code is transmitted in an octal (base-8) number system, not decimal (base-10). Squawk codes range from 0000 to 7777. The maximum digit is 7; you will never be instructed to squawk an 8 or 9 (if you hear one, it is likely an error).