05 Binary Representation
In the little endian system where is the least significant byte
lowest address
What are the standards for interpreting binary numbers?
ASCII, RGB, Two's complement, IEEE 754
What are two widely used systems of byte ordering
Big Endian System and Little Endian System
In Byte ordering what happens to the bits
Bits within a byte remain intact
Hexadecimal 1111 =
F
Hexadecimal 11110011 =
F3
Hexadecimal 1111001111110011 =
F3F3
Bit in binary representation
each digit in binary representation
Memory address
every byte of memory is identified by a unique number
IEEE 754 is a widely used standard for
floating point numbers
In the big endian system where is the least significant byte
highest address
Is hexadecimal case sensitive?
no
1000 0011 1110 0101 0111 0011 0010 1111 What is the least significant byte?
byte 0 0010 1111
1000 0011 1110 0101 0111 0011 0010 1111 What is the least significant bit?
byte 0, bit 1
1000 0011 1110 0101 0111 0011 0010 1111 What is the most significant byte?
byte 3 1000 0011
1000 0011 1110 0101 0111 0011 0010 1111 What is the most significant bit?
byte 3, bit 31
ASCII is a widely used standard for
characters
RGB is a widely used standard for
colors
We need _________ to understand binary numbers.
context
In the virtual memory what is the memory address of 2^32
0xFFFFFFFF
What prefix is used for hexadecimal notation?
"0x"
Hexadecimal notation: use characters
'0' to '9' and 'A' to 'F'
Endianness
ordering of bytes within a multi-byte object in memory
Virtual memory
program views memory as a very large array of bytes
Everything is represented as a ______________________________ in digital systems
sequence of binary numbers
Two's complement is a widely used standard for
signed integers
What OS is the big endian system?
sun, PPC, internet
Once context is known, we need to know what?
what standard to use to interpret binary numbers
What OS is the little endian system?
x86
What Two's complement represents "1"?
0......00000001
What RGB represents "black"?
0000....0000
1000 0011 1110 0101 0111 0011 0010 1111 What is byte 0?
0010 1111
What IEEE 754 represents a float "0.25"?
001111101000000......0
For ASCII, what binary number represents "A"
01000001
For ASCII, what binary number represents "a"
01100001
1000 0011 1110 0101 0111 0011 0010 1111 What is byte 1?
0111 0011
In the virtual memory what is the memory address of element 0
0x00000000
int x = 0x1234567; Byte 0 (LSB) = 0x67 Byte 1 = 0x45 Byte 2= 0x23 Byte 3 (MSB) = 0x01 Write in Big Endian system?
0x100 0x101 0x102 0x103 01 23 45 67
int x = 0x1234567; Byte 0 (LSB) = 0x67 Byte 1 = 0x45 Byte 2= 0x23 Byte 3 (MSB) = 0x01 Write in Little Endian system?
0x100 0x101 0x102 0x103 67 45 23 01
FA1D37B_16 == ______________ == _____________
0xFA1D37B ==0xfa1d37b
What Two's complement represents "-1"?
1......1111111
What does A represent?
10
1000 0011 1110 0101 0111 0011 0010 1111 What is byte 3?
1000 0011
What does B represent?
11
1000 0011 1110 0101 0111 0011 0010 1111 What is byte 2?
1110 0101
What RGB represents "white"?
1111....1111
What does C represent?
12
What does D represent?
13
What does E represent?
14
What does F represent?
15
How many possible representations of a byte are there?
256
How many bytes in 32-bit machine?
2^32 = 4294967296 bytes
Hexadecimal 0011 =
3
How many GB in a 32-bit machine?
4GB
A bit can be...
O2 or 12
What is the smallest memory access unit?
a byte
Byte in binary representation
a group of 8 bits
memory is physically implements with ____________________ in a _________ shape
a hierarchy of different memory spaces in a pyramid shape
Easy conversions from/to binary: a single hex digit is equivalent to...
a single hex digit is equivalent to 4 digits of binary (one-to-one mapping)
Program views memory as
a very large array of bytes
Hexadecimal notation
base 16 number representation
Each element of the virtual memory stores a
byte (8 bits)