CS Chap #1 (Sub-topic 1.1: Data Representation) Flashcards
Binary
number system is base 2, using only bits 0 and 1.
One’s Complement and Two’s Complement
- Invert all number. ( 1 becomes 0, 0 becomes 1).
- After One’s Complement add one to the solution.
Hexadecimal
number system is base 16, using only digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.( A=10, B=11, C=12, D=13, E=14 and F=15)
Binary Coded Decimal (BCD)
number system that uses 4 bits to represent each denary digit
ASCII code
Coding system for all the characters on a keyboard and control codes.
Unicode
Coding system which represents all the languages of the world (first 128 characters are the same as ASCII code).
Kibibyte, Mebibyte, Gibibyte, Tebibyte, Pebibyte
2^10, 2^20, 2^30, 2^40, 2^50
Kilobyte (KB), Megabyte (MB), Gigabyte (GB), Terabyte (TB), Petabyte (PB).
10^3, 10^6, 10^9, 10^12, 10^15
How to convert form Hexadecimal to Binary?
Use four bits in decimal to represent one hexadecimal value. (Vice versa for Binary to Hexadecimal)
Uses of Hexadecimal
Memory Dump, Error Messages, HTML Colour, IP Address
Uses of BCD
When denary numbers need to be electronically coded and/or displayed.
e.g.
- to operate displays on an electronic calculator
- Date and time stored in BIOS of PCs
- Financial applications
- Identification of latitude and longitude (e.g. cell towers)
- Barcodes
Difference between ASCII and Unicode
ASCII- 7-bit system (128 character),
Unicode- extended character set for ASCII that has 1,000s of characters (first 128 of both are the same)
Advantages of Unicode
- Much larger number of characters or group of characters
- Contains some non western european characters