CHAPTER 2 HARDWARE
AND SOFTWARE
Cambridge International AS and ALevel IT
AS Level IT Chapter 2 - Hardware and
Software Flashcards | Quizlet              1
HARDWARE
Hardware is categorised into input, output and storage
devices.
● Input devices allow data to be sent to a computer
  (e.g.keyboard)
● Output devices allow the communication of
  data/information from a computer(e.g. monitor).
● Storage devices store data on to a storage medium
  so that it can be used at a later time.
                                            2
HARDWARE
           3
CENTRAL PROCESSINGUNIT
 ●   The ALU performs calculations and
     logical operations.
 ●   The CU runs the fetch - execute
     cycle which fetches instructions
     from memory and executes them.
●    Input data is taken from input
     devices (such as a keyboard) or
     storage and processed by the CPU,
     which produces output data that can
     be stored or sent to an output device
     (such as a monitor).
                                             9
CENTRAL PROCESSINGUNIT
●   CPUs usually consist of multiple cores.
●   Each core is a separate processor, so a
    quad-core CPU has four processors.
●   Processors are measured by the number of
    instructions   they  can    process  per
    second(hertz).
●   A 3GHz (gigahertz) processor can process
    up to 3 billion instructions per second.
                                              5
    SYSTEM SOFTWARE
●   Programs that are designed to maintain or operate the computer
    system are known as system software.
       The software that operates the computer hardware is known
        as the operating system.
       Programs that are used to maintain a computer system
        (e.g. anti-malware software) are known as utility software.
                                           6
OPERATING SYSTEMS
                    7
                    1- OPERATING SYSTEMS
An operating system manages hardware by carrying out tasks such as:
● Allocating memory to software
● Sending data and instructions to output devices
● Responding to input devices such as when a key is pressed
● Opening and closing files on storage devices
● Giving each running task, a fair share of processor time sending error messages or
  status messages to applications or users
● Dealing with user logons and security.
                                        8
    TASK
    ●
9
      2- DEVICE DRIVERS
●   While the operating system can manage
    the general instructions to deal with
    hardware such as displaying graphics on a
    screen, it requires the use of device drivers
    to deal with specific makes and models of
    hardware.
●   A device driver is the software that comes
    with an external hardware component and
    sends customized instructions to that
    specific component.
                                                    printer
                                               10
     2- DEVICE DRIVERS
●   By using common device drivers, software
    applications are able to issue generic
    commands such as ‘print’ to the
    operating    system without having to
    know the different instructions required
    for every different make and model of
    external hardware components.
                                          11
      3 - Translators
      i - COMPILERS
                                                                              Exe file
                                                                             Object file
●   A compiler translates a program written in a high-level programming language in
    to machine code which a computer can understand.
●   The file containing the machine code is known as an executable file because it
    can be executed by the processor.
●   It can also be referred to as the object file. The original high-level
    programming language file is known as the source file.
                                            12
                                                                   Object file - Exe file
         i - COMPILERS
●    When a program is compiled, the whole
    source code is translated into the executable
    file at once and can then be distributed to
    resellers, customers and individual computers.
●   As it is in an executable format, it can only run on operating systems for which the
    compiler has translated it.
●   For example, programs that have been compiled for Windows will not work on Linux
    unless they are compiled again for Linux. The same situation exists with mobile phone and
    tablet operating systems.
●   If there are errors it will enlist all at ones, then need correction and recompilation of
    whole code that is why DEBUGGING is slower in working
●   Compilation is faster.
    i - COMPILERS
✘ Compilation process includes three stages
      ✗ Lexical analysis
      ✗ Syntax analysis
      ✗ Code generation
1-Lexical analysis
-    White spaces and comment are removed from code.
-    Rest code is divided into token.
-    Token ,in fact represent “Key word”, constant, identifier, string
     number, operator and punctuation mark.
 i - COMPILERS
2-Syntax analysis
 During syntax analysis ,syntax is verified.
 Each token is analyzed.
 After that a dictionary is created for all variables, their data types
   and values.
3-Code generation
✘ After this source code is converted to machine code.
✘ This machine code is dependent on the OS where its compiled
    ii - INTERPRETERS
●   Interpreters also translate a program written in a high level programming
    language into machine code, but use a different method, instead of translating
    the whole source code at once, it is translated one line at a time.
●   This can be less efficient than a compiler because it takes time to do the
    translating as the program is being executed and also because statements
    within programming loops (e.g. FOR, REPEAT, WHILE) have to be analysed
    eachtime round.(Compilation is slow)
●   It removes error line by line so DBUGGING is faster.
                                                                                     103
    ii - INTERPRETERS
●   Interpreters are often used to translate
    macros or application-based script languages
    and object oriented languages           (e.g.
    Visual Basic and Java for Applications),
    which can be particularly useful when a
    document needs to be opened on a variety
    of operating        systems.(Produced an
    intermediary code)
●   Interpreters are also used when testing
    programs so that parts of the program can be
    executed without having to compile the
    whole program.                                  104
18
DIFFERENCE BETWEEN COMPILER &
         INTERPRETER
                 19
DIFFERENCE BETWEEN COMPILER &
         INTERPRETER
                 20
3- LINKERS
●   Computer programs often consist of several modules (parts) of programming
    code.
●   Each module carries out a specified task with in the program.
●   Each module will have been compiled into a separate object file.
●   The function of a linker(also known as a link editor)is to combine the object files
    together to form a single executable file.                                          108
    3-LINKERS
●   In addition to the modules used, the program may make reference to a common
    library.
●   A common library contains code for common tasks that can be used in more than
    one program, such as mathematical functions, memory management, progress
    bars /output. The linker is able to link modules from a library file into the
    executable file.
●   Not all modules are always needed and a linker is able to select which modules
    will be part of the executable file.
                                         23
3-LINKERS
            24
UTILITY SOFTWARE
                   25
    4- UTILITIES
●  Utilities are part of system software.They are designed to
   perform functions which maintain the computer system.
These utilities perform different functions likes
●   Memory Management
●   Disk formatting
●   Deletion of Files
●   e.t.c
www.computerhope.com/jargon/u/utility.htm
                                            26
      i-ANTI-VIRUS
●   Anti-virus software is sometimes referred to as anti-malware software as it
    deals with other threats such as adware and spyware as well as viruses.
●   It has two main functions.The first is an anti-virus monitor that is
    continually monitoring the system for viruses and malware.
●   If the anti-virus monitor detects any unusual behavior or tell-tale signs of viruses
    or malware then it will prevent them from being executed so they cannot cause
    damage to files or programs.
●   The second function is to check for viruses or malware that may already be
    on a system.This is usually known as scanning the system.
                                            27
i- Anti Virus
    • Protection from Malware
    • Keep up to date so combat latest Malwares
    • Anti virus can remove and quarantine malwares.
    • Different scanning options
    • Facility to schedule scan
    Method to detect virus
    • Signature based detection
        Only able to detect old.
    • Heuristic based detection(reverse engineering)
        Decomposed to and matched with DB
        Specific percentage of virus code found then declare as virus
        Drawback false positive can be there.
    • Behavioral based Malware detection             Advantages and Disadvantages
        Sending large email                         Anti Virus program
        Altering files                              www.hitechwhizz.com/2020/03/6-advantages-and-
                                                     disadvantages-drawbacks-benefits-of-antivirus-
        Sandbox execution                           software.html
       BACKUP
●   Backup utilities create a second copy of data and
    programs that are in a remote storage.
Manual/Automatic Backup
●   A backup utility can be executed by the user, in which
    case the backup takes place when the user ask it to, or it
    can be scheduled to execute at a predetermined time
    so that the backup takes place automatically.
●   The user is usually able to select which folders and files
    will be backed up and can usually decide where the
    backup will be stored.
●   Cloud backup ,baking up devices(CDRW, CDROM,Tape
    Disk)
DATA COMPRESSION
●   Data compression utilities will reduce the original
    size of files so that they use up less storage space.
●   This can be achieved on a file-by-file basis or for a
    set of files or even a set of folders.
●   It will be slower to open the compressed file, but as
    it is smaller it will use up less storage and can be
    transferred from one location to another more
    quickly.
                                          32
DISC DEFRAGMENTATION
                 33
DISC DEFRAGMENTATION
                 34
     DISC DEFRAGMENTATION
●   Track, Sector and cylinder
●   As a hard disc gets used, files are kept together in storage on the same cylinder or
    adjacent cylinders.
●   As files grow in size, they use up more space on the disc and this may no longer be
    on the same or adjacent cylinder.
●   The problem with this is that when opening the file, the access arm of the hard
    disc drive has to keep moving to different locations which makes opening the file
    a slow process.
●   When files are deleted, gaps are left on the disc. When all the cylinders have been
    used, the only space to store files is within the gaps. If the gaps are not big enough,
    then files have to be split across gaps, meaning that they become defragmented
                                              35
DISC DEFRAGMENTATION
●
                       36
    DISC DEFRAGMENTATION
●   A defragmentation utility will reorganise all the files so that each file is contiguous
    (kept together).
●   It will do this by moving fragmented parts of files and small files to free space on
    the disc and creating space on whole cylinders or adjacent cylinders.
●   It will then move the defragmented files to a place where the whole file is kept
    together.
●   This can significantly improve the performance of a computer system, especially if
    program files have become fragmented and can be defragmented.
●   https://www.youtube.com/watch?v=AtRIOUZuI2c
●   https://youtu.be/2QmgbDKuhx8             37
       FORMATTING
●   When a disc is prepared for first time use, it needs to be formatted.
●   Formatting is the process of organizing the tracks on the disc into sectors.
    Each sector is where data will be stored.
●   A used disc can also be formatted, in which case all data will be lost and the tracks
    prepared again as if the disc was being used for the first time.
                                           38
     FILE COPYING
●   Files can be copied using features within an operating system’s own interface.
    However, this can be slow and options are limited.
●   File-copying utilities enable users to have more control over which files are
    copied and how they are copied.
●   For example, a user may only want to copy word processing documents that are
    within a series of folders and they may want all the files to be copied to a single
    folder on the destination storage.
●   It is also possible to synchronize files across multiple storage locations or even
    multiple computer systems, so that when a change is made to a file in one
    location, it will then be updated in all other locations.                        172
    DELETING
●   Some files become locked by an operating system and it becomes almost
    impossible to delete them.
●   Deleting utilities can overcome this problem by deleting locked files and folders.
●   When files are deleted using normal deletion methods, the data is still on the disc
    although the user can’t see it.
●   Therefore another function of deleting utilities is being able to delete files
    permanently so that they cannot be restored or accessed.
●   Some deletion utilities will remove temporary files that are no longer needed by
    the computer system, or files that are no longer used but haven’t been deleted
    when a program has been uninstalled or a user profile removed.                       173
Past Paper QUESTIONS
                       41
Past Paper QUESTIONS
                   42
QUESTIONS
            43
CUSTOM-WRITTEN VS OFF-THE_SHELF SOFTWARE
                   44
      CUSTOM-WRITTEN VS OFF-THE_SHELF
      SOFTWARE(with respect to development)
●   When a client requires a software solution that will carry out a specific
    purpose that is unique to their organization, they will ask for the software to be
    written for them. This is known as custom-written software because it is
    customized to the needs of the client and will meet the requirements of the
    client.
●   When software already exists and is purchased online or from a shop, it is known
    as off-the-shelf software. The software will have been written for a general
    purpose that is likely to be useful to a large market. Anybody can purchase the
    software for a specified price.(e.g adobe ,MS Office and SAP for accounting)
                                         45
CUSTOM-WRITTEN VS OFF-THE_SHELF
          SOFTWARE
                  46
CUSTOM-WRITTEN VS OFF-THE_SHELF
          SOFTWARE
                  47
QUESTIONS
            48
Proprietary software (With respect to ownership)
 • Software owned by a single person or organization and sell under a license .
 • Only exe file is provided while source code remain with owner
 • Different type of license are available
      Freeware (can be used free of charges)
      Share ware (Same as freeware but active for a specific time then whole
     or few features are not available)
      Single user
      Multi user
     Example MS office
                                        49
    OPEN Source Software
• Often available as free software provided along the source
  code.
• User can change source code and redistribute.
• But it is not compulsory in each case ,that is in many cases
  source code will be provided for installation, customization and
  redistribution on payment.
   Like Mozila Firefox and open office
                                 50
    DIFFERENT TYPES OF USER
           INTERFACE
●   An interface is the boundary between two
    systems.
●   A user interface is the boundary between the
    user and the computer system.
●   A user interface represents the communication
    between a user and the computer system.
●   This communication can take many forms.
                                        51
    COMMAND LINE
      INTERFACE
●   A command line interface (CLI) allows a user to enter text commands to which the
    computer system will respond.
●   The computer system will respond by producing results in a text format.
●   CLIs use very little memory so they are useful in old systems or for maintenance
    of very small systems/devices (e.g.engine management systems).
●   They are also useful for technical users who need to carry out complex
    operations which cannot be performed using more user-friendly interfaces.
●   However, CLIs can be difficult to learn and use because users have to learn
    and remember all the commands, and errors are easily made when entering
    those commands.
   DOS
COMMANDS
●   DATE
●   TIME
●   DIR
●   CLS
      GRAPHICAL USER
      INTERFACE (GUI)
● The most common type of interface that we use is a graphical
  user interface (GUI).
● GUIs are found on desktop computers, tablet computers, mobile
  phones, televisions, set-top boxes, photocopiers and some in-car
  entertainment systems.
                                   54
  GRAPHICAL USER
  INTERFACE (GUI)
GUIs can include some or all of the
elements
The acronym WIMP is commonly
used to remember these elements.
                                      55
       GRAPHICAL USER
       INTERFACE (GUI)
● Complex GUIs require a lot of memory to operate, but simpler GUIs can
  be used where memory is limited.
● Although CLIs don’t require much memory, simple GUIs can be used
  instead of a CLI in small systems such as embedded systems.
● It is common place to find simple web-based GUIs for the maintenance of
  devices such as routers, switches and printers.
● GUIs are intuitive to use which means they are easy to learn because
  commands are represented by pictures and menus provide options that can
  be selected.
   However, CLI can be restrictive for some technical users who need to
   carry out unusual tasks.                                               153
     Important Features of User
         Interface Design
●   Colour -Text must be legible.This means using a light font on a dark background or a
    dark font on a light background.
●   Layout - Careful consideration should be given to the layout of information, icons and
    inputs on a screen. Similar information, icons or inputs should be grouped together.
●   Font size- The standard size of font for reading is 11 or 12 points which is legible
    for most users.
●   Quality of information - If too much information is provided to a user, then this can
    cause information overload and may mean that much of it is ignored.
●   Controls- Controls are used on form.                                                    156
CONTROLS
           58
CONTROLS
           59
CONTROLS
           60
Badly Designed Input
       Screen
                       61
DIALOGUE INTERFACE
●   A dialogue interface refers to using the spoken word to communicate with a
    computer system.
●   A user can give commands using their voice and the computer system can
    respond by carrying out an action or with further information using a
    synthesized voice.
●   Dialogue interfaces are very popular with mobile devices, including mobile
    phones and in-car entertainment systems.
●   The main problem with this type of interface is the computer system’s ability to
    recognize the spoken word.                                                         154
    GESTURE - BASED
       INTERFACE
●   Gesture-based interfaces will recognise human motion.
●   This could include tracking eyes and lips, identifying hand signals or
    monitoring whole body movement.
●   There are many applications of gesture-based interfaces, including
    gaming, which have led to the development of other gesture-based
    interfaces.
●   Gestures can be an essential form of interaction for some disabled users who
    cannot use conventional input devices.
                                                                                   155
Thank You