Top-Rated Free Essay

Basic Computer Concepts

Powerful Essays
CS 11 Handout
Outline
I Basic computer concepts A Definition of a computer B Number systems and conversion C Types of programming languages Program Development Cycle A Problem Identification B Logic Formulation C Coding D Testing and Debugging E Storage and Maintenance Program Logic Formulation A Algorithms B Algorithm Representation 1 Flowchart 2 Pseudocode Programming Fundamentals A Data Types B Variables and Constants C Operators D Expressions Control Structures A Sequential B Conditional C Iterative Modular Programming A Subprograms B Parameter-passing C Return values

electronic device as opposed to a simpler electric device. Electronic vs electric? A machine or device is electrical simply if it uses electricity for it to function. A machine, on the other hand, is electronic if it uses electrical charge in circuits and manipulates the flow of electricity to perform a variety of functions depending on where charge is routed. Hardware Hardware are the parts of a computer that are tangible or a person may sense. Components of a computer may also be classified according to their purpose. 01 Input devices exempli gratia, keyboard, mouse, microphone, scanner, et cetera 02 Output devices exempli gratia, monitor, speaker, printer, et cetera 03 Storage devices exempli gratia, diskettes, compact discs, bar codes, et cetera 04 Processor Some components now may perform more than one function. For example, touchscreens allow both input and output to be performed. Such devices are more aptly called interface devices. Other examples of these are Braille pads (keyboards with tactile and haptic feedback for persons who are visually-impaired) and CD-RW drives. CD-RW drives allow input by reading discs and output by writing to them. On the other hand, CD-ROM drives are only input devices as they do not have the functionality of writing on compact discs. Software Software is the intangible component of the computer. Software is what often makes modifications or controls what the hardware does. These are more flexible than the hardware as the user may modify these more conveniently. In addition, it is easier to create software than hardware.

II

III

IV

V

VI

Basic computer concepts
Definition of a computer A computer is defined as an electronic device that accepts input, stores and manipulates or processes data, and provides output in the form of useful information. With this definition, the four classical functions of a computer are defined. 01 02 03 04 Input Processing Output Storage

It is important to note that the concept of a modern computer involves it being an

Software may be classified as either 01 System software; or 02 Application software. System software are programs that deal directly with the hardware and bridges the hardware and the application software. Operating systems like Microsoft Windows, Linux, and Mac OS X allow for other programs to run on top of the hardware of the computer. To avoid having users deal with computers at a low level, application software are designed and made to make operating the computers much easier. Peopleware Peopleware is a modern term used to refer to anybody involved in the development or use of software or hardware systems. Technically, these persons are no longer part of the computer, but highly influence the technology attached to it. Number systems and conversion The numeral system we are used to as persons is not what the computer finds convenient to represent. This is borne out of the number of fingers by which a group of our ancestors used to count with. Each digit represented in a numeral system is magnified by a power of its base. For example, 24310 is a representation for 2×102 + 4×101 + 3×100 or 2×100 + 4×10 + 3×1. There are, in fact, other numeral systems used by different groups before. • The duo-decimal system was used by groups of Chinese by counting on each of the twelve finger segments on one hand aside from the thumb. • The sexagesimal system is an extension of this method by counting up to 12 on each finger segment on one hand for each finger on the other. • The vigesimal system was developed by the Mayans, Aztecs, and Celts by using all fingers and toes to count to 20. This is

also used by Eskimos in Greenland, the Tamanas of Venezuela, and the Ainu of Northern Japan. • The quinary system still being used in provinces in India today sees persons counting to 5 before moving to the next power. The computer, however, has no fingers or toes to count with. What it does understand, however, is the absence or presence of a signal, charge, or current. This led to the development of digital computers able to differentiate OFF from ON. This property, in turn, allowed for representation of numbers just using two digits: 0 and 1. Binary system The computer uses the binary system to represent everything from numbers to letters to photographs and more. Each signal of 0 or 1 is called a bit. A group of eight bits is called a byte. Half of a byte is called a nybble (or sometimes nibble). Carrying the wordplay forward, there have been moves to call other groups by the following names Term Size crumb two bits tayste playte 16 bits chawmp dynner 32 bits gawble tayble 64 bits However, usage of anything apart from a byte and a nybble are seldom used. A binary number 1011 01002 is a representation for 1×27 + 0×26 + 1×25 + 1×24 + 0×23 + 1×22 + 0x21 + 0×20 or 1×128 + 0×64 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 0×1 or 128 + 32 + 16 + 4 = 18010.

To represent a counting number in binary, you may perform either place-value subtraction or repeated division. Place-value subtraction To convert a decimal number to binary using place-value subtraction,
01

02

03

Get the largest power of 2 smaller than the number being converted. That would be the leftmost 1 in the binary number. Subtract the power of 2 from the original number. The power of 2 would then be halved. If it is larger than the difference from Step 02, write a 1 after the last written digit and go back to Step 02 again. Otherwise, write a 0 and repeat Step 03 if the power of 2 is still not 1.

Types of programming languages Since everything in computers are represented by a series of 0s and 1s, programs themselves are made out of binary sequences. It is completely possible to write programs using just 0s and 1s, but it would be incredibly difficult to do so. This is called machine code. Low-level programming languages are built on top of the machine code so it would be more convenient for humans to write programs without having to understand the intricacies of 0s and 1s. Furthermore, built on top of low-level programming languages are high-level languages. The give-and-take among these is the fact that despite being easier to code in a high-level language, low-level languages produce code that is more efficient. Program Development Cycle There are several models to the creation of software. One of the more simple ones involve five steps:
01 02 03 04 05

Repeated division To convert a decimal number to binary using repeated division,
01

02

Divide the number being converted by 2. The remainder would be the rightmost digit in the binary number. Keep on dividing until the quotient is 1. That 1 would be the leftmost digit in the binary number.

Though it is true that computers only understand binary, representing numbers in binary requires a long sequence of digits. As a compromise between persons and computers, numbers may also be represented in octal systems and hexadecimal numeral systems. Letters and other common characters are conveniently represented by a byte each. If a letter is being called for, each character is represented by a particular numerical equivalent. This was a standard established in 1963 so it will also be possible to have letters be coded with 1s and 0s with the American Standard Code for Information Interchange. A is represented by 65, B with 66, and so on. Other characters such as punctuation marks and other symbols also have their own numeric equivalents.

Problem analysis and definition Logic formulation Coding Testing and debugging Storage and maintenance

Problem analysis and definition involves identifying the reason for creating software and what the program requires to run properly. These are the following:
01

02

03

Output objective of the software, typically useful information transformed from input Given what are in the environment, what it takes to perform the transformation from pre-processed data to useful information Input what is needed from the user, whatever else is taken to be able to solve the problem

04

Restrictions a limiting factor to the input

Logic formulation is when the programmer creates the solution and puts it into terms that other programmers may possibly understand. This is the stage where an algorithm is developed. An algorithm is a step-by-step set of instructions that will lead the computer to an answer based on the variables to be in play. It is important in an algorithm to have a defined point at which the program will terminate An algorithm may take on one of several forms but the most common are a flowchart and a pseudocode. A flowchart is a graphical representation of the algorithm. Flow is directed from one operation to another using flow lines (arrows) and branches off in decision boxes (diamonds). Due to the dichotomous nature of computer decision-making, exactly two flow lines come out of a decision box. A pseudocode is textual representation of the flow. It could be in different formats, too. A recipe for a dish is an algorithm. A paragraph of detailed instructions is also an algorithm. For computer programs, a pseudocode may be written in numbered format as in the image below or may also be in indented format to denote blocks of execution.

Coding is the stage when the algorithm is keyed in to a file that the computer can translate then understand. This is when a programming language is involved. It is possible that after coding, the program may still not work due to errors for one or more case so it is important to try and break the program by testing and debugging. If at one point, an error is identified, it may be classified as either a syntax error or a semantic error. A syntax error means that something went wrong while coding. Often, programs will not even begin to run if a syntax error is encountered. On the other hand, a semantic error means that something went wrong in logic formulation or that the algorithm was coded incorrectly. Finally, storage and maintenance happens when users of the program may have needs that will come out in the future. At any point of the cycle, one may have to go back and re-examine the program for possible modifications. Programming Fundamentals Software need to remember values and modify data to be useful. To remember these, programs make use of variables. Variables may be of different types. They can be integers, fractions, characters, sequences of characters, and more. These are called data types. In many programming languages, once a variable is tied to a data type, it could no longer be changed. This means it is crucial to associate the correct data type to a variable. As opposed to variables, programming languages also employ constants. These variables and constants are used along with operators to form expressions.

This is executed in order and returns to continue execution at line 10 when line 30 is encountered. This is a bad algorithm as it does not have a defined termination condition.

Operators are used to embed particular functions that are performed on one or more values. In arithmetic, we’ve learned some of these operators (+, , ×, ÷).

Common operators for many programming languages are the following + arithmetic operators * / % ^ increment decrement assignment compound assignment ++ -= += -= *= /= %= < > = = or == or != && logical operators || ! ternary conditional addition subtraction or unary negation multiplication division modulo exponentiation (not available in C, used for bitwise XOR) add 1 subtract 1 assign value performs the operation on a variable and assigns to it less than greater than less than or equal to greater than or equal to equal to not equal to conjunction (AND) disjunction (OR) negation (NOT) evaluates to b if a is true; otherwise evaluates to c

03

Iterative

A program or program segment is considered sequential if it is straightforward in implementation. Id est, steps to transform data to information requires the same steps each time it is executed. It would then be conditional if a decision were made that affects how the program is run. Depending on the data and how the condition is stated, the program may run differently in different cases. Finally, it would be iterative if after a decision is made, it were possible for the program to go back and do the same operations over based on the condition and the status of the program. The distinguishing quality of a sequential program’s flowchart is one where all boxes have at most one flow line coming to it. The characteristic feature of a conditional program’s flowchart is the presence of a decision box that leads to different smaller program segments. To cap off, the property of an iterative program’s flowchart would be the presence of a flow line returning to segment of the flowchart that may have already been passed through.

comparison operators

Modular Programming
Many times, it would be more convenient for a programmer to reuse code or functions that would otherwise be repeated. This is where modular programming comes in handy. A program may be broken down into smaller modules, or subprograms, if the pieces of code will be used often. In these cases, subprograms could be represented by code just once in a program. If these subprograms were to need its own “sub-input”, parameters may be passed to it for it to complete its job. In return, it may pass back a value if the situation calls for it. This is called its return value.

a ? b : c

Expressions may also be joined by operators to form even bigger expressions.

Control structures

Well-formed software and program segments adhere to one of the following control structures:
01 02

Sequential Conditional

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Syllabus in BASIC COMPUTER CONCEPTS AND OFFICE PRODUCTIVITY TOOLS CT101 I. Description of the Course: This course covers the areas of information technology and computer literacy including history, ethics, careers, and examples of how computers and communications technologies are being used both in education specifically and society in general. Furthermore, the course introduces current system and application programs being used today and provides the learner the…

    • 2283 Words
    • 10 Pages
    Satisfactory Essays
  • Good Essays

    Computer Basics

    • 5887 Words
    • 24 Pages

    erUNIT 1 INTRODUCTION TO COMPUTERS Structure 1.1 1.2 1.3 Introduction Objectives Introduction to Computers Why Computer? Evolution of Computers 1.3.1 The First Computer 1.3.2 Some Well Known Early Computers 1.3.3 Computer Generations 1.4 1.5 1.6 1.7 1.8 1.9 Components of a Computer Hardware vs Software System vs Applications Software Bits and Bytes Input and Output Devices RAM/ROM 1.10 Secondary Storage Devices 1.11 Summary 1.12 Answers to SAQs 1.1 INTRODUCTION This unit aims…

    • 5887 Words
    • 24 Pages
    Good Essays
  • Powerful Essays

    Basics of Computer

    • 3726 Words
    • 15 Pages

    Basics of Computer :: 1 1 Basics of Computer 1.1 INTRODUCTION In this lesson we present an overview of the basic design of a computer system: how the different parts of a computer system are organized and various operations performed to perform a specific task. You would have observed that instructions have to be fed into the computer in a systematic order to perform a specific task. Computer components are divided into two major categories, namely, hardware and software. In this lesson we…

    • 3726 Words
    • 15 Pages
    Powerful Essays
  • Better Essays

    Computer Basics

    • 2082 Words
    • 6 Pages

    Computer Basics Ty Christian English Allied American University Short Response Discuss where a computer stores its basic hardware settings, why it does so, and what some of those settings are. A computer is a very complex and complicated piece of equipment that take teams of professional’s to manage. What people seem to forget is even this enigma of hardware also have a very basic system that fires it up. This is called the BIOS (Basic Input/Output System). As the name suggests…

    • 2082 Words
    • 6 Pages
    Better Essays
  • Good Essays

    Computer Basic

    • 2553 Words
    • 11 Pages

    INTRODUCTION Computer is defined as a combination of electro-mechanical devices (Hardware) capable of accepting data or information, processing, storing, and providing output under the control of some instructions and commands called programs (Software). Computers are machines that perform tasks or calculation according to a set of instruction or programs. Introduce in 1940s the first fully electronic computers were huge machines that required teams of people to operate. Compared to those early…

    • 2553 Words
    • 11 Pages
    Good Essays
  • Better Essays

    Computer Basics

    • 5521 Words
    • 23 Pages

    Operating System: An operating system (OS) is a set of software that manages computer hardware resources and provides common services for computer programs. The operating system is a vital component of the system software in a computer system. Application programs require an operating system to function. Types: 1. Real-time A real-time operating system is a multitasking operating system that aims at executing real-time applications. Real-time operating systems often use specialized scheduling…

    • 5521 Words
    • 23 Pages
    Better Essays
  • Powerful Essays

    Computer Basics

    • 1269 Words
    • 4 Pages

    TASKBAR In the graphical user interface (GUI) for a computer operating system or application, a taskbar is a visual device on the desktop that typically shows the user which applications (tasks) are currently active and running. Combined window management and program launching As noted above, the Windows 7 taskbar combines two previously separate bits of functionality: Open window management and program launching/file opening. Prior to Windows 7, the taskbar was generally used only to manage open…

    • 1269 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    Computer Concepts

    • 819 Words
    • 4 Pages

    Computer Concepts – Illustrated 8th edition Objectives * Define computers *Explore how computers work *Categorize computers *Examine personal computers *Introduce software *Introduce the Internet and the Web *Understand email basics Defining Computers Computer * An electronic device that: * Accepts input * Processes data * Stores data * Produces output * Uses instructions in stored programs Personal computer (PC) Computer system…

    • 819 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Computer Concepts

    • 634 Words
    • 3 Pages

    COMPUTER CONCEPTS A computer is a machine that processes data and performs tasks according to a set of instructions. To do anything, computer must be give specific directions to follow. They get these directions from software. Software, such as that used for word processing, is a set of step-by-step instruction for the computer, written by computer programmers in a programming language like BASIC, Pascal, or C. Computers also get instructions from you, the user. When you use the mouse (more…

    • 634 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Computer Basics

    • 330 Words
    • 2 Pages

    Section 5 Study Questions (18.0 points) Answer each question fully. Complete sentences are not necessary, but some questions may require more than one sentence to answer them fully. Lesson 1 (5.0 points) 1. What is a screen in a presentation called? (1.0 points) slide 2. What file extension do Impress files use? (1.0 points) open office 3. What can you use to create a presentation quickly, without making it from scratch? (1.0 points) template 4. What is…

    • 330 Words
    • 2 Pages
    Satisfactory Essays