0% found this document useful (0 votes)
2 views

Lecture 6 - Information Representation & Computer Number System

The lecture covers key aspects of information representation in computing, including bits and bytes, binary representation, character encoding, and various data structures. It explains how different numeral systems (binary, decimal, octal, hexadecimal) are used for numeric representation and discusses the representation of text, images, audio, and video. Additionally, it touches on machine code, assembly language, and the importance of semantic representation and mathematical notation.

Uploaded by

petereunice65
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 6 - Information Representation & Computer Number System

The lecture covers key aspects of information representation in computing, including bits and bytes, binary representation, character encoding, and various data structures. It explains how different numeral systems (binary, decimal, octal, hexadecimal) are used for numeric representation and discusses the representation of text, images, audio, and video. Additionally, it touches on machine code, assembly language, and the importance of semantic representation and mathematical notation.

Uploaded by

petereunice65
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

COS 101

Lecture 6

Information Representation & Computer Number System

Instructor:
Dr. Anthony Nwohiri
Senior Lecturer, Dept. of Computer Science
Key aspects of information representation
Bits and bytes
Binary representation
Character encoding
Numeric representation
Text representation
Image representation
Audio representation
Video representation
Key aspects of information representation
Data structures
Database representation
Graph representation
Boolean algebra
Machine code and assembly language
Semantic representation
Mathematical notation
Bits and
bytes
The fundamental
unit of digital
information is the
bit, which can
represent a binary
value of 0 or 1.
BINARY
REPRESENTATION

The binary system is a way of representing


data using combinations of 0s and 1s.
Letter
a
ASCII Code Binary
097 01100001
Letter
A
ASCII Code Binary
065 01000001 Character
encoding
b 098 01100010 B 066 01000010
c 099 01100011 C 067 01000011
d 100 01100100 D 068 01000100
e 101 01100101 E 069 01000101
f 102 01100110 F 070 01000110
g 103 01100111 G 071 01000111 Defines a standardized way to represent
h 104 01101000 H 072 01001000 characters, symbols, and text in digital systems.
i 105 01101001 I 073 01001001
j 106 01101010 J 074 01001010 ◦ Common character encodings include:
k 107 01101011 K 075 01001011
l 108 01101100 L 076 01001100 • ASCII (American Standard Code for
m 109 01101101 M 077 01001101 Information Interchange) – Uses 7 bits to
n 110 01101110 N 078 01001110
o 111 01101111 O 079 01001111
represent 128 characters, including English
p 112 01110000 P 080 01010000 letters, digits, and some symbols.
q 113 01110001 Q 081 01010001
r 114 01110010 R 082 01010010 • Unicode – Supports nearly all languages and
s 115 01110011 S 083 01010011 symbols (emoji, mathematical symbols, etc.)..
t 116 01110100 T 084 01010100
u 117 01110101 U 085 01010101
v 118 01110110 V 086 01010110
w 119 01110111 W 087 01010111
x 120 01111000 X 088 01011000
y 121 01111001 Y 089 01011001
z 122 01111010 Z 090 01011010
Numbers can be represented using various
Numeric numeral systems – binary, decimal (base 10),
representation octal (base 8), and hexadecimal (base 16).
Different bases are useful for different
applications.
Text
representation
Means converting data or
concepts into a written format,
essentially expressing
information using words and
sentences, allowing for human
understanding and analysis
Image
representation
Using pictures or symbols to visually display data,
making it easier to understand and interpret at a
glance.
Images are typically broken down into tiny
squares called pixels, each with a specific color
value.
Colors within an image are usually represented
using a color model like RGB (red, green, blue)
where each pixel has a value for each primary
color.
AUDIO
REPRESENTATION

The process of conveying data or


meaning through audible sounds
Video
representation
◦ Means using a sequence of moving
images (video) to convey information.
◦ It refers to the way a video is structured
and formatted to effectively
communicate information, including
the arrangement of frames, color
palette, and visual elements within each
frame.
Arrays.

Linked Lists

Data structures Trees

Graphs

etc
Database
representation
Means storing and organizing data in a
structured format within a computer
system, typically using tables with rows
and columns.
Graph
representation
Means visually displaying data or
relationships between entities using
a network structure where nodes
(points) represent individual entities
and edges (lines) connect them
Boolean algebra
Deals with logical operations using
only two possible values, "true" and
"false," typically represented as 1
and 0 respectively.
For manipulating logical statements
using operations like AND, OR, and
NOT.
Machine code is the lowest-level
programming language, consisting
of binary instructions (1s and 0s) that
a computer's central processing unit
(CPU) can directly understand and
Machine code execute.
and assembly
language Assembly language is a human-
readable representation of machine
code. It uses mnemonics (short
words or symbols) to represent the
binary instructions that the CPU
understands.
Semantic
representation
A way to represent the "meaning"
behind the data, not just the words
or symbols used to describe it
Mathematical
notation
Mathematical notation is a system of
symbols and conventions used to
represent mathematical concepts,
operations, and relationships in a
concise, precise, and standardized
way.
COMPUTER
NUMBER
SYSTEM
Decimal Number System –
most popular

Binary Number System


Some
examples
Octal Number System

Hexadecimal Number System


Decimal Number System (Base-10) Binary Number System (Base-2)
Digits used: 0 to 9 Digits used: 0, 1
Example: 456₁₀ Example: 1011₂ (Binary representation of decimal
Used in: Everyday human calculations 11)
Used in: Computers, digital electronics,
machine language

Octal Number System (Base-8) Hexadecimal Number System (Base-16)


Digits used: 0 to 7 Digits used: 0 to 9 and A to F (A=10, B=11, ...,
Example: 27₈ (Octal representation of decimal 23) F=15)
Used in: Shortened representation of binary Example: 1A3₁₆ (Hexadecimal representation of
numbers in computing decimal 419)
Used in: Memory addressing, color codes (e.g.,
#FF5733 in HTML)
To convert a decimal number to binary, you can divide the
decimal by 2 repeatedly, recording the remainders until the
quotient is 0. Then, write the remainders in reverse order to
get the binary number

To convert a binary number to a decimal number, you

Decimal ⇄ can multiply each binary digit by the corresponding power


of 2, then add the results together

Binary To convert a decimal fraction to a binary fraction, you


conversion can multiply the fraction by 2 repeatedly until the fractional
part is 0. Then, you can write out the integer parts from each
multiplication in reverse order.

To convert a binary fraction to a decimal fraction, take each


binary digit to the right of the decimal point, multiply it by its
corresponding power of 2 (which decreases by 1 for each
digit to the right), and add the results together; essentially,
each digit represents a fraction of 1/2, 1/4, 1/8, and so on,
depending on its position
Take home

DECIMAL ⇄ OCTAL DECIMAL ⇄ HEX


CONVERSION CONVERSION
ASCII (American Standard Code for Information
Interchange) is a character encoding standard
that represents text as numbers

In ASCII, the 26 uppercase letters range from 'A'


to 'Z' (ASCII codes 65 to 90), and the 26
lowercase letters range from 'a' to 'z' (ASCII
codes 97 to 122).
ASCII In ASCII, the 10 digits are "0" through "9" (ASCII
codes 48-57), and 7 common punctuation
marks are typically considered to be: period (.),
comma (,), semicolon (;), colon (:), question mark
(?), exclamation mark (!), and apostrophe (‘)

20 to 40 special characters
THANK YOU FOR
LISTENING

You might also like