| Low-level operations in C | |||||||||||
| C was invented as a high-level systems programming language | |||||||||||
| Higher than assember, but still close to the machine | |||||||||||
| Binary data representation | |||||||||||
| int type: two's complement | |||||||||||
| float type: IEEE 754 | |||||||||||
| hexadecimal: another representation for binary | |||||||||||
| Hexadecimal constant: | |||||||||||
| int i = 0x1234abcd; | |||||||||||
| Can use upper or lower case for digits | |||||||||||
| Read or print hex values: | |||||||||||
| scanf ("%x", &i); | |||||||||||
| printf ("%x", i); | |||||||||||
| Manipulating individual bits: | |||||||||||
| bitwise logical operators | |||||||||||
| bitshift operators | |||||||||||