© Slobodan Dmitrović 2021
S. DmitrovićModern C for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-6643-4_50

Bitwise Operators

Slobodan Dmitrović1  
(1)
Belgrade, Serbia
 

So far, we have talked about data in terms of bytes. A byte is the smallest addressable region of memory/data storage. We access and manipulate this memory through variables and pointers. One byte can be used to represent the value of a single char variable. Four bytes can be used to represent the value of a single int.

A single byte usually consists of eight smaller parts called bits. A bit can have one of two values we symbolically refer to as 0 and 1. A single byte that represents the decimal number 1 can have the following bit representation:
A single byte representing the ...

Get Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.