This section simply talks over the simplicity of 1s and 0s being the powerhouses behind the technologies that we use today.
This overview speaks to binary, what bytes are and how the counting works in the base two system.
When computes intepret instructions, they need to know the byte order known as endianness. Little endian is right-to-left, but we might also read in ascending order (big endian).
The formatting can depend on the computer architecture.
Most modern computers use little endian.
Select one answer
A link to the docs for memory instructions can be found here
This is more important if you are a micro-architecture engineer.
The phrase machine code is often used when describing low-level programming. Hex is the lowest form of "human-readable" format that we can program in.
The example given is 0x2E7
which can be calculated like so:
Math block
A great website for understanding Hexadecimal
We can use our toString() method
Object.prototype.toString(radix)
Radix refers to the base.
Radix/Base | Type |
---|---|
2 | binary |
10 | decimal |
16 | hexidecimal |
function hexToDecimal(hex) { return hex.toString(16) } // hexToDecimal(0x2e7) function decimalToBinary(decimal) { return decimal.toString(2) } // decimalToBinary(22)
The ability to store these 1s and 0s in state. There is long-term and short-term memory.
I skipped over notes for this section as it was more of a repeat from uni.
This is a review on different forms.
Type | Example |
---|---|
Floating Point | 142.24 |
Integer | 123 |
Unsigned Int | 123 (gives back signed bit for space |
Under the hood, all numbers in javaascript are 64-bit floating points whereas Web Assembly are all memory pointers of 32-bit.