Skip to main content

Questions tagged [bit]

2 votes
5 answers
2k views

When writing platform independent software in C++, can I nowadays safely1 assume that a byte has a size of 8 bits? Or do I have to calculate it like this, for example: #include <climits> std::...
stackprotector's user avatar
2 votes
6 answers
667 views

In software engineering, often developers will utilize three different states of a signed integer, as a trilean: This tends to be quite typical: -1 - Represents something akin to a null pointer, as in ...
Anon's user avatar
  • 3,649
1 vote
2 answers
2k views

Is there a logical reason why the integer is upgraded to 32+ bits? I was trying to make an 8bit mask, and found myself a bit disappointed that the upgrade will corrupt my equations. sizeof( quint8(0)...
Anon's user avatar
  • 3,649
0 votes
4 answers
2k views

I know that the compiler and architecture of a processor also have a role to play in this. But this is more of a "can it" rather then a "does it" question. I have already tried to research this, but ...
skyline's user avatar
  • 11
1 vote
2 answers
139 views

I have just encountered this sentence: Depending on the context, we may prefer to model integers as bitvectors rather than mathematical integers, since the Int type does not model overflow. I am ...
Lance Pollard's user avatar
2 votes
3 answers
443 views

Current and common processing units are 8, 16, 32, 64, 128, etc bit. Why are their datapath multiple of 8 ? Is this all linked to the fact that the industry has settled with a 8-bit byte ? The PDP-7 ...
Benoît's user avatar
  • 129
3 votes
5 answers
869 views

All languages I have seen so far have multiple builtin data types (int, double, float, char, long...). But if we look closely, they are just arbitrary arrays of bits, the only difference between them ...
Ford O.'s user avatar
  • 223
4 votes
4 answers
7k views

Why are most computers byte addressable instead of bit addressable? By B/b addressable I mean that processor can operate on level of single B/b. Bit addressable advantages: Booleans have size of one ...
Ford O.'s user avatar
  • 223

15 30 50 per page