Data representation - Number systems (paper 1) Flashcards

1
Q

what is the order of binary representation

A

Bit, Nibble, Byte, Kibibyte, Mebibyte, Gigabyte, Tebibyte, Pebibyte, Exibyte

Ben Nibbled Bens Keish Made Gratefully To Paul

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how and why do computers use binary to represent all forms of data

A
  • computers are made up of switches : 2 states= off (0) and on (1)
  • all data needed to be converted into binary to be processed by computer
  • data is processed using logic gates and stored in registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how many bits are in a Nibble

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how many bits are in a Byte

A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how many bytes are in Kibibyte

A

1024 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how many KiB are in a MiB

A

1024 KiB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how to convert binary into positive denary

A
  • write out the place holders above the binary - 1,2,4,8,16….
  • add the numbers which have a 1 under
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what base system does denary have

A

base of 10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to convert positive denary into binary

A
  • start with the most significant bit
  • then keep going down
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what number system does hexadecimal have

A

base 16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what are 10 - 15 represented by in hexadecimal

A

A-F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how to convert binary into hex

A
  • split 8-bit binary number into 2 nibbles of 4 bits
  • convert each nibble separately - starting from 1,2,4,8
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

convert 01001111 into hex

A

0100 = 4
1111 = 15 = F
4F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how convert hex into binary

A
  • convert each hex value into a 4-bit binary value
  • join to make a byte
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

convert 7E into binary

A

7 = 0111
E = 14 = 1110
01111110

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how to convert hex into denary

A
  • multiply hex digits by their column place values 16 and 1
  • add results**
17
Q

convert 5B into denary

A

5 x 16 = 80
B = 11
11 x 1 = 11
80 + 11 = 91

18
Q

how to convert denary into hex

A
  • work out how many 16 go into the number = 1st hex digit
  • take remainder = 2nd hex digit
19
Q

convert 219 into hex

A

219 / 16 = 13 r 11
13 = D
11 = B
DB

20
Q

how and why hexadecimal is used as a beneficial method of data representation.

A
  • hex is easier to humas to read + remember than binary - shorter representation than binary
21
Q

2 main uses

what are the 4 uses of hex within areas of computer science

A
  • Colour values in photo editing + web design –> 1Hex no. = 1 nibble
  • MAC addresses = unique number given to all Internet-connected devices - each address written in hex
  • IPv6 addresses
  • Unicode
22
Q

what are the rules of binary addition

A

0+0 = 1
0+1 = 1
1+1 = 0 carry 1
1+1+1 = 1 carry 1

23
Q

add 01011011 + 00111010

A

01011011
00111010
——————-
10010101

24
Q

when will an overflow occur

A
  • occurs when the result of adding 2 binary numbers is greater than the bits allowed:
    • max value in a 8-bit register = 255
  • a computer or a device has a predefined limit
    that it can represent or store, e.g. 16-bit
25
Effect of right logical shifts:
x2 each time
26
what is the effect of shifting to the right
divide by 2 each time
27
what happens binary shifts and what happens in the empty spaces when the binary is shifted
- The positive binary integer is **multiplied or divided** according to the shift performed - The **most significant bit(s) or least significant bit(s) are lost** - Bits shifted from the end of the register are lost and **zeros** are shifted in at the opposite end of the register
28
when does an issue occur regarding the precision in binary shifts
- when **odd numbers** are divided / numbers that can fully divide --> byte **cannot represent fractional numbers** - when 1 is lost at the end = last digit dropped is odd
29
what is the meaning of unsigned and signed representation
**Unsigned** = binary number can only represent **positive numbers** **Signed** = represent both **positive + negative** numbers
30
in twos complement what does the left most bit represent
it is the **sign bit**: - **1** = **negative** - **0** = **positive**
31
what is the maximum and minimum value a signed 8-bit register can hold
max = 127 min = -128
32
what number is the leftmost bit in binary two's complement if the number is negative
1
33
how to convert negative denary number into binary
- work out **positive binary equivalent** - **flip** all bits - **add 1**
34
convert -21 into binary
21 = 0001 0101 flip = 1110 1010 +1 = ____________1 convert:**1110 1011**
35
how do you convert negative twos complement binary number to denary
- flip - add 1 - work it **positive denary** - switch it to the **negative equivalent**