Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Computer and Network Technology: BCS Level 4 Certificate in IT study guide
Computer and Network Technology: BCS Level 4 Certificate in IT study guide
Computer and Network Technology: BCS Level 4 Certificate in IT study guide
Ebook355 pages3 hours

Computer and Network Technology: BCS Level 4 Certificate in IT study guide

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This interactive study guide will support candidates in developing fundamental knowledge and understanding of the basics of computer and network technology, processor architecture and networks, and with an introduction to operating systems and system software. It explains key concepts within the Computer and Network Technology module and helps candidates prepare for their exams, including explainer videos, interactive questions and skills challenges aligned to the syllabus and with industry practice.
LanguageEnglish
Release dateJan 4, 2023
ISBN9781780176017
Computer and Network Technology: BCS Level 4 Certificate in IT study guide

Related to Computer and Network Technology

Related ebooks

Networking For You

View More

Related articles

Reviews for Computer and Network Technology

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Computer and Network Technology - Gary Thornton

    Chapter 1 – The fundamentals of computer and network technology

    Learning objectives and assessment criteria

    The learning objectives covered within this chapter are:

    Use Boolean algebra and other digital design techniques to construct simple digital circuits such as adders used to build computers.

    Understand different computer architectures.

    Use low-level instructions and addressing modes to construct a simple program.

    The assessment criteria addressed within this chapter are:

    1.1 Demonstrate and apply representation of decimal integers within computer systems.

    1.2 Explain and design a system that uses a variety of logic gates.

    1.3 Demonstrate and apply sequential logic elements.

    Computers, tablets and smartphones are a fundamental part of modern society, and using programs and apps on a daily basis has become second-nature to most people. From the user’s perspective, things appear to just happen when they push a key or touch a screen, and few give a thought to the host of underpinning technologies that are needed for this to work.

    This chapter discusses the fundamental concepts of how computers process data to deliver an increasing range of services. These include:

    Representing decimal integers (for example, binary and hexadecimal)

    Converting integers from one base to another

    Representing negative numbers, fractional numbers and floating-point numbers in binary form

    Converting decimal to floating-point numbers and vice versa

    The limitations of floating-point arithmetic

    Floating-point addition

    1.1 Representing decimal integers

    As human beings, we are used to a counting system based on 10, quite possibly because we can easily count to 10 on our hands. Although this system was used in many ancient cultures, it is now commonly referred to as the decimal system, from the Latin decima, which means ‘a tenth part’ – or as it is called in computing, base 10.

    Thankfully, we no longer use the Roman method of writing numbers, so when we look at a standard keyboard, we see the decimal system on the number keys, which are labelled with the numerals 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

    A meter is a good example of how we count upwards from zero in decimal.

    We start by increasing the digit furthest to the right from 0 through to 9. It then returns to 0, while the digit on the left next to it, which is 10 times larger in value, increases by 1. The right-hand digit then again cycles from 0 to 9, the next digit along increases by 1 and so on. This pattern can be used to carry on counting with no upper limit.

    We can also represent negative numbers by using a minus sign: −1, −2, −3, −1 000, −1 000 000 and so on.

    We also need to be able to represent quantities that are not whole numbers (non-integers), and we can do this by using a ‘decimal mark’ to separate the integer part from the fractional part. In many countries, this decimal mark is a dot (‘decimal point’), but in some others, it is a comma.

    *Note: In this book, we use the decimal point.

    By combining these simple concepts, we can represent very large or very small, positive or negative, integer and non-integer numbers.

    1.2 Converting integers

    So do we need to use base 10? There is a common saying that, if dogs or cats ruled the earth, we would count using base 8 (think about their paws).

    In fact, any number could be used as the base for a counting system. Most modern computer systems use base 2, or binary, internally, although this is often presented externally as base 8 (octal) or base 16 (hexadecimal) because these are easier for humans to understand.

    We need to know how numbers are represented in these different bases and how to convert between them.

    In decimal, as we know, we can use 0–9, but in binary, we can only use 0 and 1, while in octal, we can only use 0–7 and in hexadecimal, we use 0–9 and then A–F (see table 1.1).

    Table 1.1 Number bases used in computing

    *Note: To avoid confusion, in this book, all numbers are assumed to be decimal unless specifically postfixed as follows:

    B = binary

    Q = octal (using Q to avoid it being mistaken for a 0)

    H = hexadecimal

    As we can see from table 1.1, all number bases follow the same general rule: we count from 0 up to the top value of the base and then carry the overflow into the next digit of the number. This means that the right-hand digit of the number is an integer multiplied by the base to the power of zero; the next digit is multiples of the base to the power of one; the next is multiples of the base to the power of two and so on:

    In decimal (base 10), the rightmost digit represents ones, the next digit represents tens, then hundreds and so on:

    In binary (base 2), the rightmost digit represents ones, the next digit represents twos, then fours, eights, sixteens and so on.

    Similarly, this applies to octal (base 8):

    and hexadecimal (base 16):

    There are many online calculators that can assist with converting from one base to another, but it is useful to know the process, and the only way to become familiar with it is to practice.

    Converting decimal to binary

    When converting from decimal to binary, we can use an algorithm of repeatedly dividing by two, because in binary, each digit represents a power of two. If there is a remainder, then the binary digit will be 1, and if there is no remainder, it will be 0. Note that this is working from right to left.

    Let us look at the following examples:

    Table 1.2 Example: binary value of 11

    Table 1.3 Example: binary value of 168

    Converting binary to decimal

    We know that the binary digits represent powers of two, which translate into decimal as follows.

    We can simply substitute these and add them together to get the decimal value.

    Worked example

    Calculate the decimal value of the following binary numbers

    011B

    1001B

    111011B

    10111010B

    Reading from right to left:

    011B = (1 × 1) + (1 × 2) + (0 × 4) = 3

    1001B = (1 × 1) + (0 × 2) + (0 × 4) + (1 × 8) = 9

    111011B = (1 × 1) + (1 × 2) + (0 × 4) + (1 × 8) + (1 × 16) + (1 × 32) = 59

    10111010B = (0 × 1) + (1 × 2) + (0 × 4) + (1 × 8) + (1 × 16) + (1 × 32) + (0 × 64) + (1 × 128) = 186

    Converting binary to octal and hexadecimal

    We know that the binary digits represent powers of two and that both 8 and 16 are powers of two, so translating binary into octal or hexadecimal is easily done by breaking down the binary number as shown below.

    Worked example

    Calculate the octal value of the following binary number:

    101001101110010110111B

    Remember that octal uses the digits 0 to 7, which are represented in binary as 000 to 111, meaning one octal digit for every three binary digits. That means we can rewrite our binary number into groups of three digits:

    101 001 101 110 010 110 111 B = 5 1 5 6 2 6 7 Q

    Converting the same binary number into hexadecimal simply involves using groups of four digits, which represent 0H to FH (0 to 16 in decimal):

    1 0100 1101 1100 1011 0111 B = 1 4 D C B 7 H

    *Note: As we only have one binary digit in the left-hand group, we fill the empty spaces with zeros.

    When converting from octal or hexadecimal into binary, we simply use this procedure in reverse, replacing the octal or hexadecimal digit with their equivalent three- or four-digit binary group.

    Converting between decimal, octal and hexadecimal

    It is of course possible to convert directly between decimal, octal and hexadecimal, but as it involves remembering a large number of rules, it is easier to use binary as an intermediate stage, meaning that we first convert to binary and then to the desired base.

    Worked example

    Calculate the octal and hexadecimal values of 192.

    = 11 000 000 B = 300Q

    = 1100 0000 B = C0H

    Knowledge check 1.1

    Convert the following numbers into decimal.

    Convert the following numbers into hexadecimal

    Convert the following numbers into binary

    1.3 Adding binary numbers

    We are all familiar with adding numbers in the decimal system using the concept of ‘carrying’ a value into the next column. As we have seen in table 1.1, the same principle applies in all number bases.

    Adding two binary digits (A and B) can be represented by four simple rules as shown in table 1.4.

    Table 1.4 Adding binary digits

    This type of table is also known as the truth table of a half-adder. We will come back to truth tables in section 1.7, when learning how they can be used to build logic circuits.

    Using these rules, we can see that a simple sum such as 2 + 3 = 5 can be done in binary as follows:

    If more than two numbers are to be added, it is more convenient to add them two at a time. For example, 2 + 3 + 4 = 9 is done as follows:

    Knowledge check 1.2

    Add the following binary numbers

    Add the following octal numbers

    Add the following hexadecimal numbers

    1.4 Representing negative numbers

    In the decimal system, we can easily represent positive, negative and non-integer numbers. We therefore need to be able to do the same in binary.

    Binary digits (zeros and ones) are called bits. So for a binary number that is n bits long, the range of numbers that can be represented is:

    0 to 2n – 1

    For example, for an 8-bit binary number, the range is from 0 (00000000B) to 255 (11111111B); for a 16-bit binary, it is 2¹⁶ – 1 = 63 335; for 32 bits it is 2³² – 1 = 4 294 967 295 and so on.

    Negative numbers can be represented in different ways. We will use 8-bit binaries for simplicity, but the same principle applies to other methods.

    Signed magnitude

    In the signed magnitude method, we designate the most significant bit (MSB) as a sign bit to represent the sign, meaning if the MSB is 0, then the number is positive, and if it is 1, the number is negative.

    For example, using a simple number:

    8 = 00001000B

    so –8 = 1001000B

    Sometimes a space is inserted between the sign bit and the number bits to make their purpose more apparent, so for example, –8 would become 1 0001000B

    As we have taken one bit for the sign, we have changed our number range:

    The range of positive numbers that can be represented by n bits is 0 to 2(n - 1) – 1

    The range of negative numbers that can be represented by n bits is 0 to –(2n - 1) – 1

    In our 8-bit example, we are able to represent a range of –127 (1 0000000B) to +127 (0 1111111B).

    One obvious issue here is that zero has two different possible representations:

    +0 = 0 0000000

    –0 = 1 0000000

    Also, we know that adding a positive number to its negative should be = 0. However, as the following example shows, we cannot apply simple addition rules using the signed magnitude method.

    Adding the following two numbers together should equal zero.

     8 = 0 0001000B

    –8 = 1 0001000B

    However:

    The same happens with other examples:

    One’s complement

    Taking one’s complement of a binary number means replacing the zeros with ones and vice versa. To represent a negative number, we first write it in its positive form:

    8 = 0 0001000B

    We can then change the sign bit and swap the ones and zeros in the number, which gives us:

    –8 = 1 1110111B

    As shown above, the range of positive numbers that can be represented by n bits is 0 to 2(n - 1) – 1, and the range of negative numbers that can be represented by n bits is 0 to –(2n - 1) – 1.

    In our 8-bit example, we would therefore be able to represent a range of –127 (10000000B) to +127 (01111111B).

    Again, zero has two different possible representations:

    +0 = 00000000

    –0 = 11111111.

    Now, let us try adding again using the numbers from the worked example above:

    As we can see, the answer is still 1 short of the correct answer. However, knowing this means we can use the one’s complement and simply add 1 to the result to get the correct answer.

    Two’s complement

    Negative numbers are represented in the two’s complement system by taking the one’s complement of the positive number and adding 1 to it.

    That means, to find the two’s complement representation of –8, we need to:

    So –8 is represented by 1 1111000B.

    This time, zero has only one possible representation:

    0 = 00000000

    Remember that the range of positive numbers that can be represented by n bits is 0 to 2(n - 1) – 1, and the range of negative numbers that can be represented by n bits is 0 to –(2n - 1) – 1.

    So in our 8-bit example, we are now be able to represent a range of –128 (1 0000000B) to +127 (0 1111111B).

    Using our numbers above, adding them together should now equal zero:

    *Note: We ignore the most significant digit, 1, generated by the addition, so the answer is zero.

    Enjoying the preview?
    Page 1 of 1