Skip to Main Content
Practical C++
book

Practical C++

by Rob McGregor
August 1999
Beginner to intermediate content levelBeginner to intermediate
912 pages
15h 44m
English
Que
Content preview from Practical C++

Chapter 18. Manipulating Bits

<feature>
  • Learn about bit numbering

  • Find out how to declare and use bit fields

  • Discover the bit operators

  • Learn how to manipulate bits within variables

  • Explore bit-shifting and the bit-shift operators

</feature>

Working with Bits

In Chapter 17, “Analyzing the Mathematics of Memory,” you learned the inner workings of binary and hexadecimal numeration. In this chapter, you’ll build on that knowledge and learn how to adjust individual bits as you see fit. The shroud of mystery that surrounds this low-level world of bits and bytes will fall away, revealing to you the elegance of bit operations.

As you’ll recall, there are eight bits in a byte; the C++ bit operators let you manipulate the individual bits within a byte as you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical C++ Programming, 2nd Edition

Practical C++ Programming, 2nd Edition

Steve Oualline
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 0789721449Purchase book