Unit 1 - Data representation Flashcards
What is binary?
The code that computers and machines use to process information. It is composed of a number system that only uses 2 numbers (1 and 0). Usually the 0 and 1s represent “On” and “Off”.
How does a computer understand binary?
A computer contains a CPU which is a chip made up of millions and millions of tiny switches know as micro transistors which must be in the on or off position. The on position represents a 1 and the off position represents a 0.
Why do computers use binary to represent data?
All information in a computer system, be it images, documents, sound, or movie files needs to be converted into the kind of data that can be represented in switches so that it can be understood and worked on by the computer
How many bits in a byte?
8 bits
What is the number 10011010 in denary?
1 x 128 + 1 x 16 + 1 x 8 + 1 x 2 = 154 denary
What are the four different uses for hexadecimal?
- error codes
- MAC addresses
- IPv6 addresses
- HTML colour codes
Why do computer scientists uses hexadecimal?
It is more convenient because one hex digit represents 4 binary digits. It is far more easier for humans to remember, copy and work with. For example, 16 bits of binary can be represented as 4 different digits.
What is the hexadecimal number system?
It is a number system based of 16 different digits. It involves the numbers 0 to 9 and the letters A to F. A in hex is 10 in denary and F = 15.
What is a MAC address and how does it differ from a ip address?
A MAC address (Media access control address) is a unique number that identifies the device that is connected to the internet or network.
An IP address is the location of your device on the internet, whilst a MAC address identifies the actual device.
How many bits is a MAC address usually made up of?
48 bits which are shown as 6 groups of two hexadecimal digits (NN:NN:NN:DD:DD:DD). The first half (NN:NN:NN:) of the digit is the identity number of the manufacturer of the device and the second half (DD:DD:DD) is the unique serial number of the device.
What is an IPv6 address?
An IP address (Internet Protocol address) is the unique identification number given to every device that is connected to the internet. It represents the unique location on which you are connected to the internet, allowing devices all over the world to communicate with each other. When connecting to the internet, you are assigned an IP address to use for your session. This is given to you by your network or ISP.
What would happen if we didn’t have IPv6 addresses?
Without these unique location addresses, data could not be transmitted between devices accurately
How is an IP address similar to a postal address?
You cannot expect to get letters to your home if you don’t have a postal address.
What are error codes?
Shown as hex values which refer to the memory location of the error. This helps programmers to find and then fix problems easier.
What is HTML?
HyperText Mark-up Language (HTML) is used when writing and developing web pages. HTML isn’t a programming language but is simply a mark-up language, it’s used for presentation.
How is hexadecimal used in HTML?
it is often used to represent colours of text on the computer screen. All colours can be made up of different combinations of three primary colours (red, green, blue) The first 2 digits of the 6 total digits represent the amount of red, the next two is the green and the final 2 is the blue. The hashtag symbol always precedes hexadecimal values in the HTML code to show it is a colour we are referring to.
How many different colours can you used on a HTML website?
16,777,216 colours, 256 x 256 x 256
What are the 4 rules when adding two binary numbers together?
0 + 0 = 0
1 + 0 = 1
1 + 1 = 10
1 + 1 + 1 = 11
What is a overflow and what happens if one occurs?
An overflow is where a 9th bit would generate, this is too big and wouldn’t fit in the 8-bit register. If this was to happen the program might crash or it might just ignore the extra digit and produce an unexpected result.
A computer or a device has a predefined limit
that it can represent or store, for example 16-bits, an overflow is basically when a value outside this limit should be returned.
What is a logical binary shift?
Computers can carry out logical shifts on a sequence of binary numbers. This shift means moving binary numbers to the left or right.
What is each left and right shift equivalent to?
Left shift: multiplying the binary number by 2
Right shift: dividing the binary number by 2
What happens to the empty bit after the shift occurs and what problems can this cause?
The empty positions are replaced with a zero. There is a limit to the number of shifts that can be carried out if the binary number is stored in an 8-bit register
What is the most significant bit and the least significant bit?
MSB - the number with the highest value in binary
LSB - the number with the smallest value in binary
What is two’s complement?
It is a way of representing negative integers.
How do you determine the sign of the binary number in two complement?
If there is a 1 in the left-most bit this indicates that it is a negative number, if there is a 0 in this bit this indicates that it is a positive number.
What are character sets?
Computers works in binary. As a result, all characters, whether they are letters, punctuation or digits are stored as binary numbers. All the characters that a computer can use are called a character set
What is a character code?
A character code is when you press a key on a keyboard, a number is generated that represents the symbol for that key. A complete collection of character codes is called a character set.
What are the 2 main character sets?
- ASCII
- Unicode
How is it possible to store letters that are inputted by the keyboard on a computer?
Every character on the keyboard is represented by a binary value:
- Uppercase letters (capitals) have different values from lowercase characters
- Punctuation symbols have their own character code
What does ASCII stand for?
Stands for American Standard Code for Infomation Interchange