Questions tagged [byte]
The byte tag has no summary.
27 questions
2 votes
5 answers
2k views
The size of a byte in platform independent software
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::...
0 votes
1 answer
1k views
Java takes 2 bytes to represent character?
In general a character is represented in 1 byte i.e. 8 bits . This is I believe true for all text editors even for databases like oracle. 1 byte can represent 2^8 = 256 Characters. My question is when ...
7 votes
3 answers
717 views
What is the procedure(if any) to select bytes to represent opcodes?
TL;DR What procedure is followed when selecting bytes to represent opcodes? Are byte(s) for opcodes just randomly chosen, and them mapped to mnemonics? I recently learned from this answer that ...
12 votes
6 answers
1k views
Is power-of-two bits per word "convenient"? If it is, why is that?
I find several sources claiming that power-of-two bits in a binary word (such as 8-bits per byte) is a "good thing" or "convenient". I find no source pointing out why. From What is the history of ...
4 votes
4 answers
7k views
Byte addressable vs bit addressable
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 ...
-2 votes
2 answers
723 views
Read file bytewise and find information
I have a rar file, whose header is damaged, therefore extracting is not fully possible. The contents are non-compressed, and can be read with e.g. A hex-editor. The archive contains JPEG-files, but ...
1 vote
1 answer
1k views
C# Structs, 16 byte rec. - Are getters and setters included in that?
I was reading into the nitty-gritty of structs in C# here: "C Fundamentals, The differences between struct and class." and at the very bottom it mentions keeping a struct below 16 bytes. I ...
2 votes
1 answer
32k views
Whats the difference between byte and Byte? [duplicate]
Alright so of course, I know the differences. byte is a primitive and Byte is an object. Byte offers more functions but there is one thing I dont understand. Why would anyone create a variable using ...