paint-brush
How to Manipulate Bits in C and C++by@botman1001
26,291 reads
26,291 reads

How to Manipulate Bits in C and C++

by Abhishek Singh Thakur3mDecember 4th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

In C++ programming language int data type is 16-bit, 32-bit and 64-bit type. In programming, an n bit integer is stored as a binary number that consists of n bits. In a signed representation, first bit represents the sign of a number (0 for positive and 1 for negative), and remaining n-1 bits contains the magnitude of the number. In an unsigned representation, the next number after the first bit is even and ifthenis odd. We can use & operator to check if a number is even or odd.
featured image - How to Manipulate Bits in C and C++
Abhishek Singh Thakur HackerNoon profile picture
Abhishek Singh Thakur

Abhishek Singh Thakur

@botman1001

L O A D I N G
. . . comments & more!

About Author

Abhishek Singh Thakur HackerNoon profile picture
Abhishek Singh Thakur@botman1001

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here