Converting / Data Storage

Cards (11)

  • bits to bytes
    divide by 8
  • Data needs to be converted into a binary format to be processed by a computer
  • Hexadecimal to Denary
    Multiply each character together
    e.g. 87 hexadecimal to denary
    256 16 1
    8 7
    multiply numbers in a column
    16 x 8 = 128
    1 x 7 = 7
    add the numbers together
    128 + 7 = 135
    hexadecimal number 87 is 135 in denary
  • Denary to Hexadecimal
    divide and use remainders
    e.g. denary number 106 to hexadecimal
    divide 106 by 16 = 6 (remainder 10)
    divide the remainder (10) by 1 = 10 = A in hexadecimal
    denary 106 = 6A hexadecimal
  • Binary to Hexadecimal (split into nibbles)
    each hexadecimal character is equal to a nibble in binary
    split the binary code into 4-bits to convert binary to hex
    e.g. binary 10111001
    split into 1011 1001
    Draw a table
    8 4 2 1 8 4 2 1
    1 0 1 1 1 0 0 1
    add up the top values if they have a 1 in the column below
    8+2+1 = 11 = B
    8+1=9
    binary number 10111001 is B9 in hexadecimal
  • Hexadecimal to Binary
    first convert to denary
    e.g. 8C to binary
    in denary: 8 = 8, C = 12
    Find binary value using table
    8 4 2 1 8 4 2 1
    1 0 0 0 1 1 0 0
    in binary: 8 = 1000, C = 1100
    hexadecimal 8C is 10001100 in binary
  • Add Binary number togethers
    Add 10001101 and 01001000
    Put the binary number into columns(/tables)
    from the right add the numbers
    1 0 0 0 1 1 0 1
    0 1 0 0 1 0 0 0
    1 1 0 1 0 1 0 1
    binary answer = 11010101
  • Overflow Error
    Happens during binary arithmetic when the result is more bits than the CPU is expecting
    Computer stores extra bits elsewhere to deal with it
    When doing binary addition and the answer is 9-bit, ignore the overflow and give an 8 bit answer
  • Binary Shift
    used to multiply and divide by 2
  • Left Shift
    Multiply
    for every place shifted left, number is doubled
  • Right Shift

    Divides
    for every place shifted right, number is halved