Skip to main content

Questions tagged [byte]

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
1 answer
3k views

I need to generate a large Excel file (something around 50 megs) and send response to another API which will provide it to the front end for a download option. My question is if it will be better to ...
JackTheKnife's user avatar
0 votes
1 answer
1k views

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 ...
user3198603's user avatar
  • 1,896
5 votes
5 answers
2k views

I have just started to study about computer systems and I came across this line. How can the difference in the contexts in which we view data objects make this happen? Bytes store numbers, now that ...
Pranjal Kumar's user avatar
7 votes
3 answers
718 views

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 ...
Chris's user avatar
  • 2,860
4 votes
3 answers
3k views

How is Bytecode "parsed"? It is my understand that Bytecode is a binary, intermediate representation of the syntax of a given programming language. Certain programming languages convert their source ...
Chris's user avatar
  • 2,860
12 votes
6 answers
1k views

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 ...
Andreas's user avatar
  • 317
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
5 votes
1 answer
14k views

It seems that the terms size and length are used interchangeably to describe how many bits, bytes or octets some data occupies, i.e. a length field in a data header is said to indicate the size of the ...
user3998276's user avatar
-2 votes
2 answers
723 views

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 ...
benny.utzer's user avatar
4 votes
2 answers
2k views

I am learning the union and struct and I wrote the code below. What I do not understand is why the output is different when I change from a little endian to a big endian machine. My understanding is ...
user2296949's user avatar
1 vote
1 answer
1k views

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 ...
Brian Chandler's user avatar
6 votes
3 answers
2k views

I'm working on a library that supports file reading, and right now I've always assumed that all the bytes are written in most significant bit first format. Is the least significant bit first format ...
Water's user avatar
  • 374
2 votes
1 answer
32k views

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 ...
Rhys's user avatar
  • 29

15 30 50 per page