Machine Level Operations 

C Programming Tutorial 

Go to the Table of Contents

Vist the Gifcom Corporation

Bits and Bytes. Flags/messages. Shifting.

Down in the depths of your computer, below even the operating system are bits of memory. These days we are used to working at such a high level that it is easy to forget them. Bits (or binary digits) are the lowest level software objects in a computer: there is nothing more primitive. For precisely this reason, it is rare for high level languages to even acknowledge the existence of bits, let alone manipulate them. Manipulating bit patterns is usually the preserve of assembly language programmers. C, however, is quite different from most other high level languages in that it allows a programmer full access to bits and even provides high level operators for manipulating them.

Since this book is an introductory text, we shall treat bit operations only superficially. Many of the facilities which are available for bit operations need not concern the majority of programs at all. This section concerns the main uses of bit operations for high level programs and it assumes a certain amount of knowledge about programming at the low level. You may wish to consult a book on assembly language programming to learn about low level memory operations, in more detail.