high-level programming languages can be understood by us as humans, whereas it will need to be translated into a more complex language for a computer to be able to execute it
for example: Java, Python, etc
low-level programming languages, also known as machine language, is understood by computers but not so much by humans
this could simply be a line of binary or hexadecimal
high level language must be translated to low level language before a computer is able to use it
there are two methods of achieving this:
compilation translates the whole high-level code into low-level code using a compiler
interpretation translates the whole high-level code into smaller low-level instructions using an interpreter
a complier:
uses the original code from the high-level programming language as the input to the compiler
the entire source code is compiled into low level machine language known as object code which is ready to be executed
advantage and disadvantage to a complier
advantage - it is versatile and widely compatible
disadvantage - the whole original code must be re-translated if any changes are made which is inefficient for programmers
an interpreter
translates a single high-level program into several low-level instructions
only translates each instruction when required, therefore no object code is generated
advantage and disadvantage of an interpreter
advantage - when the source code is updated, only the effected instructions require re-translating
disadvantage - the process has to take place each time the program is executed which uses processing power and inefficient for the end users
denary is another term for a decimal number, which is any number from 0 to 9
this system is known as a base-10 system, simply due to using ten different digits
binary is a numerical system that computer systems use to perform instructions and communicate
each digit is just a single bit in size
binary is a type of system called a base-2 system
it uses two digits - those digits are 1 and 0
we can use scientificnotation to represent long sums in short
for example a*a*a*a*a*a can be converted into a value that uses scientific notation
the new value would become a^6
each time the number of binary digits increases, the possible outcomes double
when referring to these, we can use scientific notation
e.g. 2 bits forms 4 binary outcomes 2^2, 3 bits forms 8 binary outcomes 2^3
hexadecimal is a place-value system used by computer systems in many different ways
hexadecimal is also much easier to interpret by humans than binary
a single hexadecimal digit is a nibble in size, which is equal to four bits
hexadecimal is a base-16 system
the values of hexadecimal:
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
converting decimal to binary:
we divide the decimal whole number by 2 continuously until we reach zero or 0.5
each time we divide by 2 we make a note of the answer - we write a 0 in the binarycolumn
not all numbers will divide to equal a whole number - when this occurs we write a 1 in the binary column and continue
it is important to ignore the 0.5 and divide by the number without 0.5; so for example if the calculation is 7/2 = 3.5 we must ignore the .5 and divide 3 next
once the column is complete, we write the binary digits from BOTTOM to TOP which gives us our binary answer
converting hexadecimal to binary
hexadecimal values go from 1 to F
convert each hexadecimal value to denary and then from denary to binary
for example, A in hex is 10 in denary, and 10 in binary is 1010
this process continues until the complete hexadecimal figure has been converted
convert the decimal number 228 to binary
11100100
convert the decimal number 251 to binary
11111011
convert the hexadecimal number D2 to binary
11010010
convert the hexadecimal number 7AB8 to binary(first bit done for you)
(0)111101010111000
bits and bytes
A) bit
B) b
C) nibble
D) kilobit
E) Kb
F) megabit
G) Mb
H) gigabit
I) Gb
J) terabit
K) Tb
L) 4
M) 1000
N) 1000
O) 1000
P) 1000
Q) lower
R) byte
S) B
T) kilobyte
U) KB
V) megabytes
W) MB
X) gigabytes
Y) GB
Z) terabytes
[) TB
\) 1024
]) 1024
^) 1024
_) 1024
`) upper
there are 8 bits in a byte
calculating the data rate
data rate = file size / time taken for transfer (s)
convert 3,450 megabytes into bytes
3.618 x 10 ^ 9
standard ASCII stores up to 128 characters at just 7 bits per character