Chuyển đến nội dung

Cambridge IGCSE Computer Science

IGCSE · Cambridge International (CAIE)Computer Science36 ghi chú trong 10 thư mục, 149 KB

36 ghi chú ôn tập cho Cambridge International (CAIE) IGCSE Computer Science, do cookie tạo, gồm 10 phần theo các chủ đề của khóa học.

Notes for Cambridge IGCSE Computer Science (0478), in folders for the syllabus's ten topics in its order: data representation, data transmission, hardware, software, the internet, automated and emerging technologies, algorithm design, programming, databases and Boolean logic. Each folder has one note per sub-topic or small group of them, with worked conversions and calculations, code in the board's pseudocode, and logic truth tables. Follows the syllabus for exams from 2026 to 2028 (version 6).

Khi thêm ghi chú, một bản sao sẽ được đưa vào ghi chú của bạn, trong một thư mục riêng cùng với các thư mục bên dưới. Bạn có thể chỉnh sửa và biến chúng thành thẻ ghi nhớ hoặc bộ câu hỏi. Tải xuống sẽ tạo một tệp zip gồm các tệp markdown, có thể mở bằng bất kỳ ứng dụng ghi chú nào.

Có gì bên trong

  • Data representation
    • Number systems: binary, denary and hexadecimal5 KB
    • Binary addition, overflow and logical shifts4 KB
    • Two's complement3 KB
    • Representing text, sound and images5 KB
    • Data storage units and file sizes3 KB
    • Data compression3 KB
  • Data transmission
    • Packets, packet switching and methods of data transmission5 KB
    • Methods of error detection5 KB
    • Encryption3 KB
  • Hardware
    • The CPU and the fetch-decode-execute cycle6 KB
    • Input and output devices6 KB
    • Sensors3 KB
    • Primary storage, secondary storage, virtual memory and cloud storage6 KB
    • Network hardware: NIC, MAC address, IP address and router4 KB
  • Software
    • System software, operating systems and interrupts5 KB
    • Programming languages, translators and IDEs4 KB
  • The internet and its uses
    • The internet and the world wide web4 KB
    • Digital currency and blockchain3 KB
    • Cyber security threats4 KB
    • Keeping data safe from security threats5 KB
  • Automated and emerging technologies
    • Automated systems and robotics5 KB
    • Artificial intelligence4 KB
  • Algorithm design and problem-solving
    • The program development life cycle, decomposition and structure diagrams4 KB
    • Flowcharts, pseudocode and trace tables4 KB
    • Standard methods of solution5 KB
    • Validation, verification and test data5 KB
  • Programming
    • Variables, constants, data types, input and output4 KB
    • Selection3 KB
    • Iteration4 KB
    • Operators, string handling and library routines5 KB
    • Procedures, functions and maintainable programs5 KB
    • Arrays3 KB
    • File handling3 KB
  • Databases
    • Single-table databases and SQL5 KB
  • Boolean logic
    • Logic gates and truth tables2 KB
    • Logic circuits, expressions and problem statements4 KB

Ghi chú đầu tiên

Data representation / Number systems: binary, denary and hexadecimal

Why computers use binary

A computer is built from electronic circuits that have two reliable states, on and off (or high and low voltage). A single circuit therefore stores one binary digit, or bit, which is 0 or 1. Every kind of data a computer handles, whether numbers, text, images, sound or the instructions of a program, has to be converted into patterns of bits before it can be processed. Logic gates work on those bits, and registers inside the processor hold them.

Three number systems

Each system is defined by its base, which is the number of different digits it uses and the value each place is worth a power of.

SystemBaseDigits used
Denary (decimal)100 to 9
Binary20 and 1
Hexadecimal160 to 9 and A to F

In hexadecimal, A to F stand for the values 10 to 15, because a single digit has to be able to hold sixteen different values. The place values in denary are powers of ten (1, 10, 100, 1000), in binary they are powers of two, and in hexadecimal they are powers of sixteen.

For an 8-bit binary number the place values from left to right are:

1286432168421

The leftmost bit is the most significant bit (MSB), because it is worth the most, and the rightmost is the least significant bit (LSB). A 16-bit number extends the same pattern to the left with 32768, 16384, 8192, 4096, 2048, 1024, 512 and 256.

Binary to denary

Write the place values over the bits and add up the values that sit above a 1.

For 01101110:

1286432168421
01101110
64+32+8+4+2=11064 + 32 + 8 + 4 + 2 = 110

Denary to binary

Work down the place values from the largest. If the place value fits into what is left, write 1 and subtract it; otherwise write 0.

For 181:

  1. 128 fits, so write 1. Left: 181−128=53181 - 128 = 53.
  2. 64 does not fit, so write 0.
  3. 32 fits, so write 1. Left: 53−32=2153 - 32 = 21.
  4. 16 fits, so write 1. Left: 21−16=521 - 16 = 5.
  5. 8 does not fit, so write 0.
  6. 4 fits, so write 1. Left: 5−4=15 - 4 = 1.
  7. 2 does not fit, so write 0.
  8. 1 fits, so write 1. Left: 0.

So 181=101101012181 = 10110101_2. Checking by adding back gives 128+32+16+4+1=181128 + 32 + 16 + 4 + 1 = 181.

An alternative is repeated division by 2, writing down the remainders and reading them from the last to the first. Both methods give the same answer, so use whichever is less likely to go wrong for you.

Hexadecimal and binary

Sixteen is 242^4, so one hexadecimal digit corresponds exactly to four bits (a nibble). That makes conversion between the two direct and needs no arithmetic.

DenaryBinaryHexDenaryBinaryHex
000000810008
100011910019
200102101010A
300113111011B
401004121100C
501015131101D
601106141110E
701117151111F

To convert binary to hexadecimal, split the number into groups of four bits starting from the right, and replace each group:

101101012→1011 0101→B 5=B51610110101_2 \rightarrow 1011\ 0101 \rightarrow \text{B}\ 5 = \text{B5}_{16}

To convert hexadecimal to binary, replace each digit with its four bits. For 2F:

2F16→0010 1111=001011112\text{2F}_{16} \rightarrow 0010\ 1111 = 00101111_2

If a binary number does not divide into groups of four, pad it with zeros on the left first. The number 1101101 becomes 0110 1101, which is 6D.

Hexadecimal and denary

Each hexadecimal place is worth a power of 16. For a two-digit number the left digit is worth 16 and the right digit is worth 1.

To convert 6E to denary: 6×16+14×1=96+14=1106 \times 16 + 14 \times 1 = 96 + 14 = 110. This agrees with the binary example above, since 01101110 is 6E.

To convert 181 to hexadecimal, divide by 16: 181÷16=11181 \div 16 = 11 remainder 5. The 11 is B and the remainder is 5, so the answer is B5. A longer number is handled by repeating the division. For 1000: 1000÷16=621000 \div 16 = 62 remainder 8, then 62÷16=362 \div 16 = 3 remainder 14. Reading the remainders from last to first gives 3, E, 8, so 1000=3E8161000 = \text{3E8}_{16}. Checking: 3×256+14×16+8=768+224+8=10003 \times 256 + 14 \times 16 + 8 = 768 + 224 + 8 = 1000.

Conversions in this course use positive whole numbers, with binary numbers of up to 16 bits.

Why hexadecimal is used

Binary is what the machine works in but it is long and easy to misread: a single 16-bit value is sixteen digits. Hexadecimal is a shorter way of writing the same bits, four times shorter, so a person is less likely to make a copying error and can read and compare values more quickly. Because each hex digit maps to exactly four bits, nothing is lost when it is converted back.

Hexadecimal appears wherever people need to read or write binary values:

  • colour codes in web pages and image software, such as #FF8800, where each pair of digits gives the red, green or blue level;
  • MAC addresses, which identify a network card;
  • memory addresses and the contents of memory, shown in debugging tools and in error messages;
  • IPv6 addresses;
  • character codes, such as the Unicode code point U+00E9.

Và còn 35 ghi chú nữa sau khi bạn thêm hoặc tải xuống.

Đánh giá

Chưa có nhận xét nào. Thêm những ghi chú này vào ghi chú của bạn để trở thành người đầu tiên viết nhận xét.