Please enable JavaScript.
Coggle requires JavaScript to display documents.
Number and Character Coding Systems - Coggle Diagram
Number and Character Coding Systems
Character Coding Systems
Chinese Character Coding Systems
Guo Biao(GB)
standard code for Simplified Chinese
Unicode
Big5 code
popular in HK and TW
mainly Traditional Chinese
characteristics of Big5 and GB
uses 2 bytes
strange characters will appear if wrong coding is used
Unicode
international standard
made up of
code point
from 1-4 bytes
use extensively to represent all languages
ASCII
each code represent a printable or unprintable character
often embedded in an 8 bit code
American Standard Code for Information Interchange
Numer Systems
Binary
Base 2
Represents in two electronic states
Use in computer systems
0 - 1
Hexadecimal
Base 16
For communicating between computer and programmers
Use in computer systems
0 - F
Denary
Use in daily life
Base 10
0 - 9
Conversions
Hexadecimal to Denary
2 C A 9 = 2 x 16^3 + 12 x 16^2 + 10 x 16^1 + 9 x 16^0 =
11433
Binary to Denary
1 0 1 1 = 1 x 2^3 + 0 x 2^2 + 1 x 2^1 +1 x 2^0 =
11
Number Representation
Byte
Smallest Addressable Unit
measurement units of memory data
Kilobyte(KB) = 1024 B
Megabyte(MB) = 1024 KB
Byte(B) = 8 b
Gigabyte(GB) = 1024 MB
Terabyte(TB) = 1024 GB
Consists of 8 bits
Bit
Single Binary Digit, basic unit
0 or 1, true or false
n-bit represent 2^n values
Word
Natural unit of data
Size as Word Length
16 bits
32 bits
64 bits
Addition and Subtraction
Overflow Error
occur when the result is outside the range it can be represented
E.g. Carry digit cannot be stored, Borrow occurs to the leftmost bit
Just do it as complicate additions/ subtractions
Binary Integer
Unsigned
contains no sign symbol
can represent non-negative integers
can represent
2^n
integers with
n
word length
Signed
Sign-and-magnitude
leftmost bit(sign bit) is 0 when positive, 1 when negative
can represent
2^n - 1
with
n
word length
rarely used
Two's Complement
all integers have unique representations
positive integer is same as original
can represent
2^n
with
n
word length
when negative, all bits are inverted
one's complement
add 1 to one's complement to get
two's complement
widely used
4C17 Sam Ching