Computer science

Cards (1012)

  • Bit
    The basic computing element that is either 0 or 1, and is formed from the words Binary digit
  • Binary number system
    A number system based on 2, in which only the digits 0 and 1 are used
  • Hexadecimal number system

    A number system based on the value 16 which uses denary digits 0 to 9 and letters A to F
  • Error codes
    Error messages (in hexadecimal) generated by the computer
  • MAC address
    Unique identifier for a device on the internet, in the form NN-NN-NN-DD-DD-DD where NN-NN-NN is the manufacturer code and DD-DD-DD is the device code
  • IP address
    Unique address for a device connected to the internet, identified as either IPv4 or IPv6
  • Hypertext mark-up language (HTML)

    The language used to design, display and format web pages
  • Example 3 Consider the conversion of the denary number, 35 000, into a 16-bit binary number:
    1. Method 1
    2. Subtract the largest possible power of 2 and keep doing this until the value 0 is reached
    3. This will give us the following 16-bit binary number: 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0
    4. Method 2
    5. Successive division by 2
    6. Write the result of the division including the remainder (even if it is 0) under the 35 000
    7. Keep dividing until the result is zero
    8. Write down all the remainders in reverse order to get the binary number: 1 0 0 0 1 0 0 0 1 0 1 1 1 0 0 0
  • The hexadecimal number system is very closely related to the binary system. Hexadecimal (sometimes referred to as simply 'hex') is a base 16 system and therefore needs to use 16 different 'digits' to represent each value.
  • Using the same method as for denary and binary, this gives the headings 160, 161, 162, 163, and so on. The typical headings for a hexadecimal number with five digits would be: (164) 65 536 (163) 4096 (162) 256 (161) 16 (160) 1
  • Since 16 = 24 this means that FOUR binary digits are equivalent to each hexadecimal digit. The following table summarises the link between binary, hexadecimal and denary:
  • As we have seen, a computer can only work with binary data. Whilst computer scientists can work with binary, they find hexadecimal to be more convenient to use. This is because one hex digit represents four binary digits. A complex binary number, such as 1101001010101111 can be written in hex as D2AF. The hex number is far easier for humans to remember, copy and work with.
  • Error codes are often shown as hexadecimal values. These numbers refer to the memory location of the error and are usually automatically generated by the computer. The programmer needs to know how to interpret the hexadecimal error codes.
  • Media Access Control (MAC) address refers to a number which uniquely identifies a device on a network. The MAC address refers to the network interface card (NIC) which is part of the device. The MAC address is usually made up of 48 bits which are shown as 6 groups of two hexadecimal digits.
  • Each device connected to a network is given an address known as the Internet Protocol (IP) address. An IPv4 address is a 32-bit number written in denary or hexadecimal form. IPv4 has recently been improved upon by the adoption of IPv6. An IPv6 address is a 128-bit number broken down into 16-bit chunks, represented by a hexadecimal number.
  • HyperText Mark-up Language (HTML) is used when writing and developing web pages. HTML uses <tags> which are used to bracket a piece of text. HTML is often used to represent colours of text on the computer screen. All colours can be made up of different combinations of the three primary colours (red, green and blue). The different intensity of each colour (red, green and blue) is determined by its hexadecimal value.
  • The # symbol always precedes hexadecimal values in HTML code. The colour codes are always six hexadecimal digits representing the red, green and blue components. There are a possible 256 values for red, 256 values for green and 256 values for blue giving a total of 256 × 256 × 256 (i.e. 16 777 216) possible colours.
  • Hex colour code
    Combination of red, green and blue primary colours represented by hexadecimal values
  • HTML hex colour code
    • FF9966
  • The # symbol always precedes hexadecimal values in HTML code
  • Colour codes are always six hexadecimal digits representing the red, green and blue components
  • Possible colours
    • 256 values for red
    • 256 values for green
    • 256 values for blue
    • Total of 16,777,216 possible colours
  • Converting denary to hexadecimal
    Activity 1.7 part 2
  • Binary addition
    Adding two 8-bit positive binary numbers
  • Binary addition rules
    • 0+0=0 carry 0
    • 0+1=1 carry 0
    • 1+0=1 carry 0
    • 1+1=0 carry 1
  • Extended binary addition rules
    • 0+0+0=0 carry 0
    • 0+0+1=1 carry 0
    • 0+1+0=1 carry 0
    • 0+1+1=0 carry 1
    • 1+0+0=1 carry 0
    • 1+0+1=0 carry 1
    • 1+1+0=0 carry 1
    • 1+1+1=1 carry 1
  • Decimal addition
    Carry and sum values
  • Overflow
    Generation of a bit beyond the maximum number of bits, indicating the sum exceeds the maximum value that can be represented
  • Logical binary shift
    Moving binary number left or right, equivalent to multiplying or dividing by 2
  • Two's complement
    Representation of negative integers using the left-most bit as the sign bit
  • Negative binary numbers in two's complement
  • Converting negative denary to two's complement binary
    Two methods shown
  • Converting negative denary numbers into binary numbers in two's complement format
    1. Write the number as a positive binary value
    2. Invert each binary value
    3. Add 1 to the inverted number
  • Negative denary numbers converted to binary two's complement
    • -18
    • -31
    • -47
    • -63
    • -88
    • -92
    • -100
    • -1
    • -16
    • -127
  • Negative binary numbers in two's complement format
    • 1100 1001
    • 1011 1110
    • 1111 1111
    • 1000 0111
    • 1010 0000
    • 1111 1001
    • 1010 1111
    • 1111 1111
    • 1000 0001
    • 1111 1010
  • ASCII code

    American Standard Code for Information Interchange, a 7-bit code representing letters, numbers and characters
  • Extended ASCII

    1. bit code allowing for more characters including non-English alphabets and graphical characters
  • Unicode
    A universal standard that can represent all languages and writing systems, using up to 4 bytes per character
  • Unicode
    • Covers all languages and writing systems
    • More efficient coding system than ASCII
    • Uniform 16-bit or 32-bit encoding
    • Unambiguous encoding
    • Reserves part of the code for private use
  • Soundwave
    Vibrations in the air that the human ear senses as sound