Fundamentals Of Data Representation Flashcards
Define the term “number base”
the number of digits or combination of digits that a system uses to represent numbers.
Describe decimal, binary and hexadecimal number bases
Decimal bases – go up in powers in 10
Binary bases – go up in powers of 2
Hexadecimal bases – go up in powers of 16
What is the purpose of hexadecimal?
Hex is useful because large numbers can be represented using fewer digits.
For example, colour values and MAC addresses are often represented in hex.
Additionally, hex is easier for humans to understand than binary.
Programmers often use hex to represent binary values as they are simpler to write and check than when using binary.
To convert hex to decimal, simply take each place value that has a unit in it, and add them together.
Example - hex number 7C
65,536 4,096 256 16 1
Result - (7 × 16) + (C × 1) = (7 × 16) + (12 × 1) = (112) + (12) = 124
Nibble -
Bit -
Byte -
Kilobyte -
Megabyte -
Gigabyte -
Terabyte -
Nibble - 4 bits
Bit - The state is represented by a single binary value, usually a 0 or 1
Byte - 8 bits
Kilobyte - 1000 bytes (1024)
Megabyte - 1000 kilobytes
Gigabyte - 1000 megabyte (1024)
Terabyte - 1000 gigabytes
Binary addition - eg. 110+ 111=
Ans. 1101
Explain binary shifts
You can replace multiplication and division by shifting bits if they are to the power of 2. Binary shifts allow us to move all the bits stored in a register on the processor either left or right. If we move the bits to the left then it is a left-shift, if we move the bits to the right then it is a right-shift.
Character Set
Computers work in binary . As a result, all characters, whether they are letters, punctuation or digits are stored as binary numbers. All of the characters that a computer can use are called a character set .
Describe ASCII (American Standard Code for Information Interchange)
ASCII uses seven bits, giving a character set of 128 characters. The characters are represented in a table, called the ASCII table. The 128 characters include:
32 control codes (mainly to do with printing)
32 punctuation codes, symbols, and space
26 upper case letters
26 lower case letters
numeric digits 0-9
Describe Extended ASCII
Extended ASCII uses eight bits, giving a character set of 256 characters. This allows for special characters such as those with accents in languages such as French and Spanish.
Describe Unicode
While suitable for representing English characters, 256 characters is far too small to hold every character in other languages, such as Chinese or Arabic. Unicode uses 16 bits, giving a range of over 65,000 characters. This makes it more suitable for those situations.