A permission mode is twelve bits, and octal is those bits written three at a time. Each digit is one class — owner, group, everyone else — and within a digit read counts 4, write 2 and execute 1, so 7 is all three and 5 is read and execute: 755 is rwxr-xr-x. An optional digit in front carries the special bits, 4 for setuid, 2 for setgid and 1 for sticky, so 4755 is rwsr-xr-x. ls -l folds each special bit into an execute position, lower case when execute is also set and capital when it is not, and a capital S almost always means a special bit was set on something nobody can execute. A mode shorter than three digits is padded on the left, so chmod 55 means 0055, not 550.
A symbolic mode is a different kind of thing: a change, not a mode. u+x means add owner execute to whatever is already there, so it has no answer until you say what it is applied to, which is what the base field is for. Two letters depend on the target as well. X adds execute only to a directory or to a file someone can already execute, which is why chmod -R a+rX is the safe way to open up a tree. And a clause with no who-letter goes through the umask: under the usual 022, chmod +w adds write for the owner only, while chmod a+w adds it for everyone. The engine is a port of the one GNU chmod uses, so copies like g=u, the numeric form =755 and the POSIX examples behave as they do on Linux.
Where Linux and macOS disagree, the result follows Linux and the difference is stated. macOS ignores o+t, which GNU treats as +t. macOS decides X from the mode before any clause runs, so u+x,a+X on a 644 file gives 744 there and 755 on Linux. And GNU chmod keeps a directory’s setgid bit through chmod 755, where macOS clears it. The meaning is written separately for files and directories, because the same bits mean different things: on a directory r lists the names, x lets you enter, and r without x shows names you cannot open. Access control lists and SELinux can allow or refuse what the mode bits say, and they are not read here — an ls -l marker of +, . or @ is recognised and explained.