Abstract
- Provides standardised way to express measurements, allowing for easy comparison of values
Bit
-
Holds a value of
0
or1
-
Let
n
be the number of bits we have, wheren>=1
-
With
n
bits, we can represent values
Given 2 bits
When
n
is ,2^n = 4
, 4 values:00
,01
,10
,11
which are corresponding to 0,1,2,3.
Maximum value of n bits
Approach 1:
Approach 2:
Given 2 bit
n
is
- Approach 1:
2^2 - 1 = 3
- Approach 2:
2^1 + 2^0 = 3
How many bits are required to represent a decimal number?
Given is a decimal number, the number of bits required to represent it is the ceiling of log₂ M, which is represented with .
Bit String
- A collection of 0s & 1s
Byte
- A group of 8 Bit
- The smallest unit a programming language uses to store the data and instruction
KB vs KiB?
B
refers to Byte, theK
refers to andKi
refers to . So1KB
is bytes and1KiB
is bytes.
Word
- The size of a word can vary depending on the Instruction Set Architecture (ISA)
- A single unit of transfer from the Main Memory to the CPU and within the CPU
- Common word sizes are 16 bits, 32 bits, or 64 bits
How do we check if a given memory address is word-aligned?
It should divisible by the word size.
Qubit
- Waiting to be explored