T1: Data representation Flashcards
What is the denary system?
Number system based on the number 10
What is the binary system?
Number system based on the number 2
What is the hexadecimal system?
Number system based on the number 16
uses of hexadecimal and advantage
Used for memory dumps, HTML, MAC addresses, web addresses and assembly code/machine code, easier to read/interpret than binary
largest 8-bit and 16-bit binary value
255, 65535
How do you convert from binary to denary?
Add the powers above the binary number, add up the binary numbers where the 1s appear
How do you convert from denary to binary?
Under powers, add 1s from left to right if it can add to the number
or remainder read from bottom up
How do you convert from memory sizes?
binary
multiply / divide by 1024
How do you convert from binary to hexadecimal?
convert each group of 4 binary digits to a hex value
How do you convert hexadecimal numbers to binary?
convert each letter/number into 4-bit binary
How do you convert hexadecimal numbers to denary?
Remember the place values and then multiply the hex number by this
How do you convert denary numbers into hexadecimal numbers?
divideby 16 and write down remainder, read from bottom up
How is hexadecimal used for memory dumps?
- memory contents are printed out either on screen or using a printer
- runs diagnostics when a computer malfunction (hex used as it is easier to use than a long string of binary values)
What is HTML used for?
hypertext markup language used for when writing and developing web pages (uses tags)
What is MAC addresses used for?
to uniquely identify a device on the internet (can be UAA or LAA)
first 6 digits for manufacturer code
How is hexadecimal used for web addresses?
ASCII codes can replace the URL (which are hex values)
How is hexadecimal used for assembly code / machine code?
makes it easier, faster and less error-prone than writing the code in binary
significance of binary
- any data needs to be converted to binary to be processed by a computer
- data is processed using logic gates and stored in registers
logic left shift equivalent
multiplying denary equivalent binary number by 2 ( x 2^(# of shifts))
logic right shift equivalent
dividing binary number by 2 ( / 2^(# of shifts))
how do logical shifts work
every bit is shifted over one where the empty one is replaced by a 0, if a 1 is replaced, there is an error as the max amount of shifts have been done
what is lost during a logical shift
either the most significant or the least significant bit
what’s the range of two’s complement
between -128 (10000000) and 127 (01111111)