11
votes
Accepted
How exactly is bytecode "parsed"?
I think your confusion comes from thinking of bytecodes as a language that is being interpreted by the virtual machine. While this is technically a correct way to describe it, it's leading you to ...
10
votes
Accepted
What is the procedure(if any) to select bytes to represent opcodes?
It's not random, but it may not be immediately apparent. And it may have evolved over time: the x86, architecture, for example, has been with us for nearly 40 years (1977), and has evolved from 16-...
8
votes
Accepted
How can the same sequence of bytes might represent an integer, floating-point number, character string, or machine instruction?
The 8-bit binary pattern 10000000 (aka 0x80), can represent:
in Windows Code Page 1252: the EURO symbol
in Latin-1: a control character
in UTF-8: a continuation byte contributing 6 bits of zero to a ...
7
votes
Accepted
The size of a byte in platform independent software
Nowadays, a byte is indeed an octet of 8 bits on most of the current computers. But the C++ standard doesn't guarantee that:
[intro.memory]/1: The fundamental storage unit in the C++ memory model is ...
7
votes
Accepted
Java takes 2 bytes to represent character?
Java was developed after Unicode was invented. So it uses 16 bit words to handle up to 65536 different characters. Unicode is intended to handle many character sets in addition to Roman letters - ...
4
votes
How exactly is bytecode "parsed"?
Byte codes are decoded. They are designed like a processor instruction set. Because the byte codes are variable length, even though we know where they are, in order to decode them, you have to ...
4
votes
Byte addressable vs bit addressable
There have been bit-addressable architectures; for example, the CDC Cyber 200 series systems. (48 bit addresses)
There was a reason for this, however. The aforementioned machine is a vector (SIMD) ...
4
votes
What is the history of why bytes are eight bits?
First a bit of clarification: Octets (8-bit units) are not really a fundamental unit in modern computer architectures. At least not any more fundamental than other powers of two - 2, 4, 16, 32, 64, ...
3
votes
The size of a byte in platform independent software
sizeof(char) is always 1, because a char is the smallest data word. But there's no guarantee that a char is 8 bits. It is on most platforms, but there may still be some obscure specialist processors ...
3
votes
What is the procedure(if any) to select bytes to represent opcodes?
I have never designed a bytecode, but here are some things I would consider if I did:
I think that it does not matter much. If people will want to work with your bytecode, they will do that using ...
3
votes
Byte addressable vs bit addressable
There have been bit-addressable computers, with variable-sized words (up to a limit), see (for example) patent US4467443.
However, the more assumptions you can make and the less flexibility you have, ...
3
votes
How exactly is bytecode "parsed"?
The file will have a small header with information about the version, where the executable bytecode is located (plus maybe information about the functions contained in it) and where the constant data (...
2
votes
Accepted
Generate large Excel files and response from API
The answer to your question depends on the answer to this question:
Do you have retention requirements for the generated Excel file?
If you do not have any requirements to keep or maintain the Excel ...
1
vote
The size of a byte in platform independent software
I have once seen source code written for sixteen bit bytes. Some DSP processor, 20 years ago. Since storing an 8 bit character in a 16 bit byte is inefficient, they had a library handling strings with ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
byte × 27bit × 12
java × 6
data × 3
c++ × 2
language-agnostic × 2
math × 2
array × 2
data-types × 2
hardware × 2
binary × 2
floating-point × 2
computer-architecture × 2
bytecode × 2
ascii × 2
c# × 1
php × 1
programming-practices × 1
c × 1
data-structures × 1
terminology × 1
language-design × 1
history × 1
parsing × 1
user-interface × 1