Flashcards in Binary and other systems Deck (15):
How to convert from binary to denary? Eg. Convert 10100001111 to denary.
Start with 2^0. Ignore all 0 values. Start from right. --> 2^0 + 2^1 + 2^2 + 2^3 + 2^8 + 2^10 = 1295.
Converting from denary to binary. 432 to binary. Use both methods.
M1 - Division method. Answer - 110110000
M2 - Trial and error - placing 1s so that they add up to 432.
Measurement of computer memory - standard - List the computer sizes from the smallest to the largest.
Bit - A single binary digit
Nibble - 4 bits
Byte - 8 bites or 2 nibbles
1 KB - 2^10 bytes
1 MB - 2^20 bytes
1 GB - 2^30 bytes
1 TB - 2^40 bytes
1 PB - 2^50 bytes
1 EB (Exa byte) - 2^60 bytes
1 ZB (Zetta byte) - 2^70 bytes
1 YB (Yotta byte) - 2^80 bytes
1 BB (Bronto byte) - 2^90 bytes
1 Geop byte - 2^100 bytes
What is a computer register?
A component of the processor that holds binary data.
Interpreting registers - How would you interpret this instruction of an 8 bit register of a robot - 10001111?
Motor A1 is on, A2 is on, B1 is off, B2 is off.
All the motors are programmed to move forwards. Those that are on move forwards.
The robot doesn't move, since only 1 motor is on.
What is the link between hexadecimal, binary, and denary? List the elements.
1. Hexadecimal, 2. Denary, 3. Binary
0 - 0 - 0000
1 - 1 - 0001
2 - 2 - 0010
3 - 3 - 0011
4 - 4 - 0100
5 - 5 - 0101
6 - 6 - 0110
7 - 7 - 0111
8 - 8 - 1000
9 - 9 - 1001
A - 10 - 1010
B - 11 - 1011
C - 12 - 1100
D - 13 - 1101
E - 14 - 1110
F - 15 - 1111
Converting from binary to hexadecimal - 1010100
Divide the binary sequence in nibbles and replace each with the corresponding hexadecimal value. Start from the right.
1010100 - 54
Converting from hexadecimal to binary - A84F
Similar method as used for binary conversion.
A84F = 1010100001001111
Converting from hexadecimal to denary - D37
1. Convert the digits to their corresponding denary value.
2. Take the hex place value. Start with 16^0 from the right.
3. Multiply answers from 1. and 2.
4. Add all of them together.
D37 - 16^0(7) + 16^1(3) + 16^2(13) = 3383
Converting from denary to hexadecimal - 250. Use both methods.
M1. Trial and error - place the hex digits in the place values so that the total is equal to the denary number.
M2. Successive division by 16. Take the numbers from the left, moving upwards.
Use of hexadecimal digits in memory dumps:
What is a memory dump?
How is hexadecimal used in memory dumps?
Why is it used instead of other systems?
A memory dump is a process in which the contents of RAM are displayed and stored in a storage drive in the case of an application crash.
A checksum value is given at the end of each row and column, so that the error can be traced.
Hexadecimal - 1. uses less storage than binary and denary (1111 = F, 15 = F), and 2. it is easier to understand: 011001010100 is harder to deal with than 654. 895658 is DAAAA in hex.
Use of hex in HTML:
What is HTML?
How is hex used there?
Why is it used?
HTML is hypertext (text that links to other text, in the same of different webpage - cross-referencing of text and graphics) markup (tags assigned to text to control how they are displayed) language. It is a markup language, meaning it is a language that it is a code that processes text and defines its presentation.
It is used in defining colors. #808080 (gray), #FF0000 (red), #800000 (maroon).
Less space, easy to use (for defining RGB values - first 2 - red value, next 2 digits are green value, next 2 digits are blue value).
Use of hex in MAC:
What is MAC address?
How is hex used here?
Media Access Control addresses are unique identifiers assigned to devices on the internets. They are used as a network address for internet technologies and are necessary for wifi or ethernet to function.
Example - 04-eB-a4-4C-F0-68 - first half refers to the manufacturer (eg. Apple, Dell, MS) and second half is the serial number.
Use of hex in web addresses:
What is a web address?
How is hex used in web addresses?
Why is hex used?
It is an address, also known as a Uniform Resource Locator (URL), that is assigned to a file or website on the world wide web.
ASCII (American Standard Code for Information Interchange) is a code used for creating URLs. It is written in hexadecimal.
Apart from the two aforementioned reasons, hexadecimal also makes it easier to give the accurate web address, especially if there is an address (in English) that many websites share.