Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

binary representation c++

#include <bitset>
...

char a = -58;
std::bitset<8> x(a);
std::cout << x << '
';

short c = -315;
std::bitset<16> y(c);
std::cout << y << '
';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #binary #representation
ADD COMMENT
Topic
Name
5+6 =