Skip to main content
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 ...
JimmyJames's user avatar
  • 28.9k
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-...
kdgregory's user avatar
  • 5,270
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 ...
Erik Eidt's user avatar
  • 34.4k
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 ...
Christophe's user avatar
  • 80.6k
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 - ...
Simon B's user avatar
  • 9,716
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 ...
Erik Eidt's user avatar
  • 34.4k
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) ...
user256761's user avatar
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, ...
JacquesB's user avatar
  • 61k
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 ...
Simon B's user avatar
  • 9,716
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 ...
svick's user avatar
  • 10.1k
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, ...
Vatine's user avatar
  • 4,259
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 (...
ratchet freak's user avatar
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 ...
Berin Loritsch's user avatar
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 ...
gnasher729's user avatar
  • 47.5k

Only top scored, non community-wiki answers of a minimum length are eligible