Please enable JavaScript.
Coggle requires JavaScript to display documents.
Data and Data Representation, Computer Programs and Programming Language …
Data and Data Representation
Data, Information, Knowledge
Data: unprocessed facts and figures
• “The price of crude oil is $80 per barrel.”
Information: data that has been interpreted
• “The price of crude oil has risen from $70 to $80 per barrel”
Knowledge: information, experience and insight
• “When crude oil prices go up by $10 per barrel, it’s likely that gas prices will rise by 14¢ per gallon”
Data Integrity
consistency
validity
completeness
compliance
correctness
Problem / Issue
• Human errors during data entry • Errors when data is transferred • Software bugs or viruses
• Hardware malfunctions
• Natural disasters
Solution
• Make data backups regularly • Control access to data (security) • Design user interfaces that validates data input
• Use error detection and
correction software when
transmitting data
Bits, Bytes, and Words
Bits
• The basic unit of information in computing and
telecommunication
• In computing, a bit is defined as a variable or computed quantity that can have only two possible
• These two values are often interpreted as binary digits and are usually denoted by 0 and 1
Bytes
• a unit of digital information in computing and
telecommunications, that most commonly consists of eight bits • a byte was the number of bits used to encode a single
character of text in a computer and it is for this reason the basic addressable element in many
Words
• In computing, word is a term for the natural unit of data used by a
particular computer design
ASCII vs Unicode
• Both are character codes
• The 128 first code positions of Unicode mean the same as ASCII
• ASCII defines 128 characters, which map to the numbers 0–127. Unicode defines (less than) 221characters, which, similarly, map to numbers 0–221 (though not all numbers are currently assigned, and some are reserved).
• Unicode is a superset of ASCII, and the numbers 0–128 have the same meaning in ASCII as they have in Unicode. For example, the number 65 means "Latin capital 'A'".
Computer Programs and
Programming Language
Computer Program
• A computer program is a set of instructions that the computer needs to follow to process the data into information.
They tell the computer:
What actions you want the computer to perform
The order those actions should happen in
Elements of Computer Program
INPUT
•Whatever data that is inserted into a computer using input devices •E.g. Mouse, keyboard
PROCESSING
•Convert input data into
information.
•E.g. CPU
STORAGE
•Store the data or information for
future use (permanently or temporarily)
•E.g. Hard disk, memory
OUTPUT
•Generate the useful information using output devices
•E.g. Monitor, printer
Programming Language
• A programming language is a system of signs used to communicate a task/algorithm to a computer, causing the task to be performed.
• The task to be performed is call computation, which follows absolutely precise and unambiguous rules.
• Contains set of instructions, data and rules that are used to construct a program.
Programming Paradigm
• A model for a class of programming language that share a common characteristics and its differences
Common Programming Paradigms
Imperative paradigm
⮚The sequential execution of instructions
⮚The use of variables representing memory locations
⮚The use of assignment to change the values of variables
Object-oriented paradigm
⮚Allow programmers to write reusable code that operates in a way that mimics the behavior of objects in the real world.
The functional paradigm
⮚Based on the abstract notion of a function as studied in the lambda calculus.
The logic paradigm
⮚Based on symbolic logic.
Imperative Paradigm
• Describe how the computer should achieve solution • Example of languages : C, Pascal, FORTRAN, ALGO 60 & COBOL • Key features:
Stored memory
Mutable variables
Sequencing, selection & iteration
Pointers