Answer the question
In order to leave comments, you need to log in
Question about the K&R book?
Here is an excerpt from the book:
The unary operator ~ bitwise "reverses" an integer, i.e., turns each 1 bit into a zero bit and vice versa. For example
, x = x & ~077
zeros out the last 6 bits in x. Note that the notation x & ~077 does not depend on the length (!!!) of the word (what else?) , and therefore it is better than x & 0177700 , since the latter implies that x takes 16 bits. The machine-independent notation of ~077 will not incur additional computational overhead, since ~077 is a constant expression that will be evaluated at compile time.
Answer the question
In order to leave comments, you need to log in
A word is two bytes or 16 bits (As written).
upd: if you look at the processor registers, then
ax is a word (two bytes)
ah is the high part of the register ax (bytes)
al is the low part of the register ax (bytes)
eax is a 4-byte register, the low part of which is the register ax. The upper part of the eax register cannot be accessed, so the maximum length of the register that can be parsed into components (ax) was called a word, and eax was called a double word.
At the beginning there was a word, and the word was two bytes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question