Computer Science AS OCR
-
1-1-structure-and-function-of-the-processor as5 主题
-
1-2-types-of-processor as3 主题
-
1-3-input-output-and-storage as2 主题
-
2-1-systems-software as8 主题
-
2-3-software-development as5 主题
-
2-4-types-of-programming-language as4 主题
-
3-1-compression-encryption-and-hashing as3 主题
-
3-2-databases as3 主题
-
3-3-networks as8 主题
-
3-4-web-technologies as13 主题
-
html as
-
css as
-
css-styling as
-
javascript as
-
variables-and-constants-in-javascript as
-
outputs-in-javascript as
-
selection-in-javascript- as
-
for-loops-in-javascript- as
-
while-loops-in-javascript- as
-
strings-in-javascript- as
-
operators-in-javascript- as
-
nested-statements-in-javascript as
-
functions-and-procedures-in-javascript as
-
html as
-
4-1-data-types as8 主题
-
4-2-data-structures as4 主题
-
4-3-boolean-algebra as1 主题
-
5-1-computing-related-legislation as4 主题
-
5-2-moral-and-ethical-issues as9 主题
-
6-1-thinking-abstractly as3 主题
-
6-2-thinking-ahead as1 主题
-
6-3-thinking-procedurally as3 主题
-
6-4-thinking-logically as2 主题
-
6-5-thinking-concurrently as2 主题
-
7-1-programming-techniques as9 主题
-
8-1-standard-algorithms-and-big-o-notation as8 主题
positive-binary-numbers- as
Exam code:H046
Binary
What is Binary?
-
binary refers to a system of representing information using only two digits: 0 and 1.
Bits
-
A bit is the smallest unit of digital information, representing either an “off” (0) or an “on” (1) state.

The status of a computer bit being on or off.
Bytes
-
Bits are grouped into larger structures to form bytes (8 bits), words, and long words
-
These groupings allow us to represent more complex information, like numbers, text, and instructions

Groups bits to store more complex information
What do the 0s and 1s represent?
-
In binary, each level is based on powers of 2
-
In the 8-bit binary number below, each of the 8 columns represents values of 2n , e.g.
-
20 = 1
-
21 = 2
-
22 = 4
-
23 = 8
-
24 = 16
-
25 = 32
-
26 = 64
-
27 = 128

Binary powers of two
Encoding and representation
-
Various encoding schemes, like ASCII for text or JPEG for images, map these binary values to human-readable forms
-
For example, the binary value 01001000 represents the letter ‘H’ in ASCII
-
In the example below, an image is shaded black or white depending on the binary value for each pixel
-
Each row in the image requires 1 byte of storage
Pixel-shading in a bitmap image
Abstraction layers
-
Computers handle large volumes of basic numeric data
-
To create meaningful representations of data, layers of abstraction exist so that basic data can be interpreted upwards into other forms, e.g. images, sound, video
-
The same principle applies to programming languages that compile down into binary code
-
At the bottom, you have binary, and each layer above it allows for more meaningful information to be represented

Abstractions of binary
Converting Between Binary & Denary
-
Within computer science, two common number systems are:
-
Denary numbers – This is also known as base-10. These are used by humans and consist of 10 digits ranging from 0 to 9
-
Binary numbers – Computer systems store data using 1s and 0s. This is known as binary or base-2. Computer systems store data in binary format because computers are made up of circuits and switches that are either on (1) or off (0)
-
-
Binary numbers can be converted into denary and vice-versa
-
For example the 8-bit binary number 01101001 can be converted into denary using the following method:

Binary to decimal conversion
Therefore the 8-bit binary number 01101001 is 105 as a denary value.
Converting Between Denary & Binary
-
To convert the denary number 101 to binary, we firstly write out binary number system
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
-
Then we start at the left and look for the highest number that is less than or equal to 101 and if so, place a 1 in that column. Otherwise, place a 0 in the column
-
128 is bigger than 101 and therefore we place a 0 in that column
-
64 is smaller than 101 so we place a 1 in that column. 101 – 64 = 37. This now means we have 37 left to find
-
32 is smaller than 37 so we place a 1 in that column. 37 – 32 = 5. This now means we have 5 left to find
-
16 is bigger than 5 and therefore we place a 0 in that column
-
8 is bigger than 5 and therefore we place a 0 in that column
-
4 is smaller than 5 so we place a 1 in that column. 5 – 1 = 1. This now means we have 1 left to find
-
2 is bigger than 1 and therefore we place a 0 in that column
-
1 is equal to the number we have left so we place a 1 in that column
-
64 + 32 + 4 + 1 = 101. Therefore the denary number 101 in binary is 01100101
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|---|---|---|---|---|---|---|
|
0 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
Responses