SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
Page 1 of 8
Chapter: 1.1 Data representation
The expansion of the computer systems has been witnessed by all ages today from the large room-sized
systems seen in old sci-fi movies to the recent versions of tablets and Laptop computers. It must be understood
that a long pathway has been established in reaching this age of technology and discreteness in size and
memory.
Data Representation is basically the methods used within the computer systems to represent information to be
stored. Computers store different types of information:
Numbers
Text
Graphics (including photo stills, videos, animations)
Audio
They may seem very different to us. On the contrary, all types of information stored in a computer are stored
internally in the same simple format: a sequence of 0's and 1's. You may be confused at this point as to how
can a sequence of 0's and 1's represent things as distinct as your selfie on the webcam, your favorite track,
your favorite movie, and your boring exam paper?
It all comes back to how we interpret the information. Computers use numeric codes to correspond to all the
information they store. These codes are related to those you may have used as a child to encrypt secret notes:
like a single finger represents a 1 and 7 fingers held together represent a 7 in decimal numbering. Any written
message can be represented numerically with this code. The codes used by computers are a tad more
complicated, and they are based on the binary number system (base two) instead of the more recognizable
decimal system (base ten). Computers use a variety of different codes used for numbers, text, and still others
for sound and graphics.
Page 2 of 8
Chapter: 1.1 Data representation
RECOGNISE THE USE OF BINARY NUMBERS IN COMPUTER SYSTEMS
FUN FACT: The base 10 (decimal) systems are sometimes called denary, which is more related with the
name binary for the base 2 system. The word “denary” also refers to the Roman denarius coin, which was
worth ten asses (an “ass” was a copper or bronze coin).
WHAT IS BINARY NUMBER SYSTEM?
Normally we write numbers using digits 0 to 9. This is called base 10. However, any positive integer (whole
number) can be easily represented in binary by a sequence of 0's and 1's. Numbers in this form are said to be
in base 2 and they are called “binary numbers”. Base 10 numbers use a positional system based on powers of
10 to indicate their value. The number 123 is really 1 hundred + 2 tens + 3 ones. The value of each position is
determined by ever-higher powers of 10, read from left to right. Base 2 works the same way, but instead of
base ten, binary uses base two.
Example:
The number 101 in base 2 is really:
1four + 0twos + 1one = (5)10
This representation was created so as to help the computers in identifying 1 as the state of ‘on’ and 0 as state
of ‘off’.
WHY USE BINARY NUMBER SYSTEMS:
The microprocessor makes use of transistors that basically identify voltage levels rather than any affirmative
value in decimal number system. Therefore a voltage level ‘high’ or ‘on’ will be identified as ‘1’ and a
voltage level of ‘low’ or ‘off’ will be identified as ‘0’. Normally high voltage is classified as 5V or 3.3V
whereas low voltage is treated as 0V. Some hardware may use different mode of identification for binary
number levels like in the case of CD-ROMs, certain microscopic black spot will be considered as binary
number ‘0’ while a shiny spot reflecting light will be considered as on. Hard disks basically apply the law of
magnetism whereas static memory utilizes electric charges on passive devices like capacitors for recognizing
number systems.
The numerous patterns of 0’s and 1’s are obtained from the devices or the computer’s internal hardware
corresponds to various representations of numbers in decimal and other formats.
systems
Page 3 of 8
Chapter: 1.1 Data representation
CONVERT DENARY NUMBERS INTO BINARY AND BINARY NUMBERS INTO DENARY
UNDERSTANDING “BITS”:
For the sake of understanding, binary numbers can be broken down into their smallest representation called
bits
The easiest way to understand bits is to think of them as digits like we learned in first grade. A digit is a single
place that can hold numerical values between 0 and 9. Digits are normally combined together in groups to
create larger numbers. For example, “6,357” has four digits. It is understood that in the number 6,357;
The 7 is filling the "1s place"
The 5 is filling the "10s place"
The 3 is filling the "100s place"
The 6 is filling the "1,000s place"
So you could express things this way if you wanted to be clear:
(6 * 1000) + (3 * 100) + (5 * 10) + (7 * 1) = 6000 + 300 + 50 + 7 = 6357
Another way to express it would be to use powers of 10. Assuming that we are going to represent the concept
of "raised to the power of" with the "^" symbol (so "10 squared" is written as "10^2"), another way to express
it is like this:
(6 * 10^3) + (3 * 10^2) + (5 * 10^1) + (7 * 10^0) = 6000 + 300 + 50 + 7 = 6357
What you can see from this expression is that each digit is a placeholder for the next higher power of 10,
starting in the first digit with 10 raised to the power of zero. The power of ten decreases from the highest
weighted digit (on the L.H.S.) to the least weighted digit (on the R.H.S.).
The binary number system works exactly the same way as the decimal system, except that it contains only two
digits, 0 and 1. Like this“1011”. How do you figure out what the value of the binary number “1011” is? You
do it in the same way we did it above for 6357, but you use a base of 2 instead of a base of 10. So:
(1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) = 8 + 0 + 2 + 1 = 11
You can see that in binary numbers, each bit holds the value of increasing powers of 2.
CONVERSION TECHNIQUES:
Let us now understand the basic conversion techniques that basically run in the background of every computer
system that is conversion from denary to binary and binary to denary number systems.
1.1.1 Binary systems
1.1.1 Binary systems
Page 4 of 8
Chapter: 1.1 Data representation
DENARY TO BINARY:
Binary number system makes use of bits and 8 bits comprise of a larger unit called byte.
In the decimal system the number 34567 could be represented as:
10^4 10^3 10^2 10^1 10^0
3 4 5 6 7
In binary the number 11001 could be written as:
2^4 2^3 2^2 2^1 2^0
1 1 0 0 1
EXAMPLE OF A SIMPLE CONVERSION OF (73)10:
Example:
Let us consider a number 98 and convert it into binary system and take it step by step:
To do this, we should check the following:
Does the number go into 128? No. so this becomes a 0.
Does it go into 64? Yes, so this becomes a 1.
Does the remaining 34 go into 32? Yes so this is also a 1
Does the remaining 2 go in 16, 8, 4, or 1? No so these are all 0′s.
Does the remaining 2 go into 2? Yes, so this is a 1.
Since there is nothing left to compare with 1, it becomes a 0 by default.
128 64 32 16 8 4 2 1
0 1 1 0 0 0 1 0
98 in binary = 01100010
The largest number we can make with 1 byte is 255. So if we wanted to make a number which is larger, we
would need to add another byte.
1.1.1 Binary systems1.1.1 Binary
Page 5 of 8
Chapter: 1.1 Data representation
BINARY TO DENBARY CONVERSION:
The term bit is short for Binary digit.
So 8 bits combined together make 1 byte.
Given“10010111” as an example.
128 64 32 16 8 4 2 1
1 0 0 1 0 1 1 1
To work this out, you multiply the numbers which are a 1 by 1 and add them together to give you the decimal
number
= (128×1) + (16×1) + (4×1) + (2×1) +(1×1)
= 128 + 16 + 4 + 2 + 1
= 151
BYTE AND ITS USE IN MEMORY SIZE
WHAT IS A BYTE?
A byte is a series of 8 bits (enough to represent one alphanumeric character) processed as a single unit of
information. A single letter or character would use one byte of memory (8 bits); two characters would use two
bytes (16 bits).
In other ways, a bit is either an 'on' or an 'off' which is processed by a computer processor, we represent 'on' as
'1' and 'off' as '0'. 8 bits are known as a byte, and it is bytes which are used to pass our information in its basic
form “characters”.
An alphanumeric character (e.g. a letter or number such as 'A', 'B' or '7') is stored as 1 byte. For example, the
letter 'R' uses 1 byte, which is stored by the computer as 8 bits, '01010010'.
A document containing 1000 characters
would use 1000 bytes (8000 bits) Note:
many non-alphanumeric characters such
as symbols (!, @,#,$,etc..) and foreign
language characters (Arabic, Japanese,
etc..) use multiple bytes.
A kilobyte (KB) is 1024 bytes and a
megabyte (MB) is 1024 kilobytes and so
on…
USE OF BINARY SYSTEMS FOR SPECIFIC APPLICATIONS
It is useful to understand that computer systems are capable to perform specific and user controlled and
oriented applications like robotics, power systems, and digital instruments and so on. Controlled devices
1.1.1 Binary systems
Page 6 of 8
Chapter: 1.1 Data representation
usually contain registers which are made up of binary digits (bits). The following example shows how these
registers can be used to control a device.
ROBOTIC SYSTEMS:
Robotic systems rely on processors to access user provided values and data. It is essential to note here that all
the data is sent via the processor in a binary format so conversions and storage has to be provided by the
processor.
Example 1
The device on the left is a mobile trolley with 3 wheels. All
three wheels can turn left or right and each wheel has its
own electric driving motor. Sensors at the front and rear of
the trolley detect an object in its path which would
subsequently stop all movement. An 8-bit register is used to
control the device.
Page 7 of 8
Chapter: 1.1 Data representation
Therefore if the input is for example: 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0
front wheel
turns left
- Back
wheels
turn left
- The
direction
is
forward
- The
motors
are on
-
Hence, the trolley is moving forward and turning left.
(i) What does this register mean?
“0 0 0 1 0 1 1 1”
(ii) How would the following be represented using the above register?
front wheel turning right
back wheels turning left
moving in a forward direction
motors on
no object in its path
Answers
front wheel not turning left or right
Rear wheels turning right
going in backward direction
motors on
Error – object in path
So the vehicle is going nowhere.
(ii) 0 1 1 0 1 0 1 0
1.1.1 Binary systems
Page 8 of 8
Chapter: 1.1 Data representation
EXAMPLE#2:
SENSORS IN PRINTING DEVICES:
Three sensors are attached to a printing device, with three alarms attached to the sensors. The first sensor, "A,"
detects if the device needs ink. The second sensor, "B," detects if the device needs repair. The third sensor,
"C," detects if the device has jammed paper. If the device jams or needs repair, alarm 1 sound. If the device
jams or is short on ink, alarm 2 sounds. If two or more problems occur at once, alarm 3 sounds.
It can now be implied that:
A=1 refers to “low ink”
B=1 refers to “Device needs repair”
C=1 refers to “device should jam”
The outputs to the system are as follows:
A1: alarm 1 sounds if B=1 or C=1(either of B=1 or C=1 will result in A1)
A2: Alarm 2 sounds if C=1 or A=1 (either of A or C being true will result in A2)
A3= any two or more of A, B, and C being ‘1’ will result in A3.
Let us now look at the cases that will form:
A B C A1 A2 A3
0 0 0 0 0 0
0 0 1 1 1 0
0 1 0 1 0 0
0 1 1 1 1 1
1 0 0 0 1 0
1 0 1 1 1 1
1 1 0 1 1 1
1 1 1 1 1 1
Questions:
1) What binary values can the register hold to alert the user of a “low ink” situation?
2) The register is holding “010”. Which alarm will sound?
3) Is the system accurate in telling the user of exactly which problem is being occurred? Point out any
one situation where user is misguided?
Answers:
1) 010, 111, 111, 111
2) A2 will sound.
3) No. System has the same alarm for one problem or more than one problem. E.g. 111 could mean that
all three problems have occurred but 111 can be received even if printer is “full on ink” or not having
“jammed paper.”
1.1.1 Binary systems

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
Muhammad Ishaq
 

Was ist angesagt? (20)

Iot data analytics
Iot data analyticsIot data analytics
Iot data analytics
 
Logical design of io t
Logical design of io tLogical design of io t
Logical design of io t
 
Security challenges in IoT
Security challenges in IoTSecurity challenges in IoT
Security challenges in IoT
 
Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1
 
Embedded System-design technology
Embedded System-design technologyEmbedded System-design technology
Embedded System-design technology
 
Software Engineering Practice
Software Engineering PracticeSoftware Engineering Practice
Software Engineering Practice
 
Ipv4 and Ipv6
Ipv4 and Ipv6Ipv4 and Ipv6
Ipv4 and Ipv6
 
Ppt 11 - netopeer
Ppt   11 - netopeerPpt   11 - netopeer
Ppt 11 - netopeer
 
Data Analytics for IoT
Data Analytics for IoT Data Analytics for IoT
Data Analytics for IoT
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
Unit 1 Introduction to Embedded computing and ARM processor
Unit 1 Introduction to Embedded computing and ARM processorUnit 1 Introduction to Embedded computing and ARM processor
Unit 1 Introduction to Embedded computing and ARM processor
 
IoT Security Risks and Challenges
IoT Security Risks and ChallengesIoT Security Risks and Challenges
IoT Security Risks and Challenges
 
Industrial IoT
Industrial IoTIndustrial IoT
Industrial IoT
 
IOT - Design Principles of Connected Devices
IOT - Design Principles of Connected DevicesIOT - Design Principles of Connected Devices
IOT - Design Principles of Connected Devices
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
 
Soc architecture and design
Soc architecture and designSoc architecture and design
Soc architecture and design
 
IoT security (Internet of Things)
IoT security (Internet of Things)IoT security (Internet of Things)
IoT security (Internet of Things)
 
Big data analysis and Internet of Things(IoT)
Big data analysis and Internet of Things(IoT)Big data analysis and Internet of Things(IoT)
Big data analysis and Internet of Things(IoT)
 
Iot architecture
Iot architectureIot architecture
Iot architecture
 
Vliw
VliwVliw
Vliw
 

Andere mochten auch

Representing sound
Representing soundRepresenting sound
Representing sound
wardjo
 
Panasonic AG-HMC151E
Panasonic AG-HMC151EPanasonic AG-HMC151E
Panasonic AG-HMC151E
AV ProfShop
 
QA fest - Web-magic of QA processes - Anton Kapitanenko - 2
QA fest - Web-magic of QA processes - Anton Kapitanenko - 2QA fest - Web-magic of QA processes - Anton Kapitanenko - 2
QA fest - Web-magic of QA processes - Anton Kapitanenko - 2
Anton Kapitanenko
 

Andere mochten auch (20)

MP3 AND MPEG4 FILE FORMATS
MP3 AND MPEG4 FILE FORMATSMP3 AND MPEG4 FILE FORMATS
MP3 AND MPEG4 FILE FORMATS
 
JPEG AND MIDI FILE FORMATS
JPEG AND MIDI FILE FORMATSJPEG AND MIDI FILE FORMATS
JPEG AND MIDI FILE FORMATS
 
Representing sound
Representing soundRepresenting sound
Representing sound
 
Lossless
LosslessLossless
Lossless
 
Proyecto justino
Proyecto justinoProyecto justino
Proyecto justino
 
IxDA Chicago Mobile Site - Designing for Users...but Who Are They?
IxDA Chicago Mobile Site - Designing for Users...but Who Are They?IxDA Chicago Mobile Site - Designing for Users...but Who Are They?
IxDA Chicago Mobile Site - Designing for Users...but Who Are They?
 
Business bavaria 10-2012_en
Business bavaria 10-2012_enBusiness bavaria 10-2012_en
Business bavaria 10-2012_en
 
Panasonic AG-HMC151E
Panasonic AG-HMC151EPanasonic AG-HMC151E
Panasonic AG-HMC151E
 
Cetelem Observatorio eCommerce 2014. Contexto económico
Cetelem Observatorio eCommerce 2014. Contexto económicoCetelem Observatorio eCommerce 2014. Contexto económico
Cetelem Observatorio eCommerce 2014. Contexto económico
 
QA fest - Web-magic of QA processes - Anton Kapitanenko - 2
QA fest - Web-magic of QA processes - Anton Kapitanenko - 2QA fest - Web-magic of QA processes - Anton Kapitanenko - 2
QA fest - Web-magic of QA processes - Anton Kapitanenko - 2
 
Presentación Asesores Locales
Presentación Asesores LocalesPresentación Asesores Locales
Presentación Asesores Locales
 
Dilo 03 web
Dilo 03 webDilo 03 web
Dilo 03 web
 
Charla GDG Madrid: Cordova + AngularJS + Ionic
Charla GDG Madrid: Cordova + AngularJS + IonicCharla GDG Madrid: Cordova + AngularJS + Ionic
Charla GDG Madrid: Cordova + AngularJS + Ionic
 
6.2.5 puntos funcion
6.2.5   puntos funcion6.2.5   puntos funcion
6.2.5 puntos funcion
 
Orquesta sinfónica 2. 1º eso
Orquesta sinfónica 2. 1º esoOrquesta sinfónica 2. 1º eso
Orquesta sinfónica 2. 1º eso
 
Tesina. álvarez arroyo josé javier1 (1)
Tesina.  álvarez arroyo josé javier1 (1)Tesina.  álvarez arroyo josé javier1 (1)
Tesina. álvarez arroyo josé javier1 (1)
 
How Computers Represent Graphics
How Computers Represent GraphicsHow Computers Represent Graphics
How Computers Represent Graphics
 
Diccionario de la lengua conga residual
Diccionario de la lengua conga residualDiccionario de la lengua conga residual
Diccionario de la lengua conga residual
 
Data compression
Data compressionData compression
Data compression
 
Lossless Compression
Lossless CompressionLossless Compression
Lossless Compression
 

Ähnlich wie 1.1.1 binary systems By Zak

Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Ppt
ekul
 
Learning& Teaching Systems Ppt
Learning& Teaching  Systems PptLearning& Teaching  Systems Ppt
Learning& Teaching Systems Ppt
Naruin
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Ppt
Kyle
 

Ähnlich wie 1.1.1 binary systems By Zak (20)

Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...
 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
 
Number system
Number system Number system
Number system
 
Chapter 4 number system
Chapter 4 number systemChapter 4 number system
Chapter 4 number system
 
As Level Computer Science Book -1
As Level Computer Science  Book -1As Level Computer Science  Book -1
As Level Computer Science Book -1
 
chap1.pdf
chap1.pdfchap1.pdf
chap1.pdf
 
chap1.pdf
chap1.pdfchap1.pdf
chap1.pdf
 
chap1.pdf
chap1.pdfchap1.pdf
chap1.pdf
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
ICT - Lecture Notes 4.pdf
ICT - Lecture Notes 4.pdfICT - Lecture Notes 4.pdf
ICT - Lecture Notes 4.pdf
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
 
New Computer Systems
New Computer SystemsNew Computer Systems
New Computer Systems
 
Computer Systems
Computer SystemsComputer Systems
Computer Systems
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Ppt
 
Learning& Teaching Systems Ppt
Learning& Teaching  Systems PptLearning& Teaching  Systems Ppt
Learning& Teaching Systems Ppt
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Ppt
 
How bits and bytes work
How bits and bytes workHow bits and bytes work
How bits and bytes work
 
How bits and bytes work
How bits and bytes workHow bits and bytes work
How bits and bytes work
 

Mehr von Tabsheer Hasan

Mehr von Tabsheer Hasan (20)

Lab Network Settings And Testing
Lab Network Settings And TestingLab Network Settings And Testing
Lab Network Settings And Testing
 
How to train cortana to respond to your voice
How to train cortana to respond to your voiceHow to train cortana to respond to your voice
How to train cortana to respond to your voice
 
How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10
 
How to pin cortana to your taskbar on
How to pin cortana to your taskbar on How to pin cortana to your taskbar on
How to pin cortana to your taskbar on
 
Introduction To Computer
Introduction To ComputerIntroduction To Computer
Introduction To Computer
 
How to set up cortana on windows 10
How to set up cortana on windows 10How to set up cortana on windows 10
How to set up cortana on windows 10
 
2210 s15 qp_ms_er_12
2210 s15 qp_ms_er_122210 s15 qp_ms_er_12
2210 s15 qp_ms_er_12
 
Databases By ZAK
Databases By ZAKDatabases By ZAK
Databases By ZAK
 
Data structures; arrays By ZAK
Data structures; arrays By ZAKData structures; arrays By ZAK
Data structures; arrays By ZAK
 
Programming concepts By ZAK
Programming concepts By ZAKProgramming concepts By ZAK
Programming concepts By ZAK
 
Pseudocode By ZAK
Pseudocode By ZAKPseudocode By ZAK
Pseudocode By ZAK
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAK
 
Ethics By ZAK
Ethics By ZAKEthics By ZAK
Ethics By ZAK
 
security By ZAK
security By ZAKsecurity By ZAK
security By ZAK
 
operating systems By ZAK
operating systems By ZAKoperating systems By ZAK
operating systems By ZAK
 
memory, storage devices and media By ZAK
memory, storage devices and media By ZAKmemory, storage devices and media By ZAK
memory, storage devices and media By ZAK
 
input devices By ZAK
input devices By ZAKinput devices By ZAK
input devices By ZAK
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAK
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 

1.1.1 binary systems By Zak

  • 1. Page 1 of 8 Chapter: 1.1 Data representation The expansion of the computer systems has been witnessed by all ages today from the large room-sized systems seen in old sci-fi movies to the recent versions of tablets and Laptop computers. It must be understood that a long pathway has been established in reaching this age of technology and discreteness in size and memory. Data Representation is basically the methods used within the computer systems to represent information to be stored. Computers store different types of information: Numbers Text Graphics (including photo stills, videos, animations) Audio They may seem very different to us. On the contrary, all types of information stored in a computer are stored internally in the same simple format: a sequence of 0's and 1's. You may be confused at this point as to how can a sequence of 0's and 1's represent things as distinct as your selfie on the webcam, your favorite track, your favorite movie, and your boring exam paper? It all comes back to how we interpret the information. Computers use numeric codes to correspond to all the information they store. These codes are related to those you may have used as a child to encrypt secret notes: like a single finger represents a 1 and 7 fingers held together represent a 7 in decimal numbering. Any written message can be represented numerically with this code. The codes used by computers are a tad more complicated, and they are based on the binary number system (base two) instead of the more recognizable decimal system (base ten). Computers use a variety of different codes used for numbers, text, and still others for sound and graphics.
  • 2. Page 2 of 8 Chapter: 1.1 Data representation RECOGNISE THE USE OF BINARY NUMBERS IN COMPUTER SYSTEMS FUN FACT: The base 10 (decimal) systems are sometimes called denary, which is more related with the name binary for the base 2 system. The word “denary” also refers to the Roman denarius coin, which was worth ten asses (an “ass” was a copper or bronze coin). WHAT IS BINARY NUMBER SYSTEM? Normally we write numbers using digits 0 to 9. This is called base 10. However, any positive integer (whole number) can be easily represented in binary by a sequence of 0's and 1's. Numbers in this form are said to be in base 2 and they are called “binary numbers”. Base 10 numbers use a positional system based on powers of 10 to indicate their value. The number 123 is really 1 hundred + 2 tens + 3 ones. The value of each position is determined by ever-higher powers of 10, read from left to right. Base 2 works the same way, but instead of base ten, binary uses base two. Example: The number 101 in base 2 is really: 1four + 0twos + 1one = (5)10 This representation was created so as to help the computers in identifying 1 as the state of ‘on’ and 0 as state of ‘off’. WHY USE BINARY NUMBER SYSTEMS: The microprocessor makes use of transistors that basically identify voltage levels rather than any affirmative value in decimal number system. Therefore a voltage level ‘high’ or ‘on’ will be identified as ‘1’ and a voltage level of ‘low’ or ‘off’ will be identified as ‘0’. Normally high voltage is classified as 5V or 3.3V whereas low voltage is treated as 0V. Some hardware may use different mode of identification for binary number levels like in the case of CD-ROMs, certain microscopic black spot will be considered as binary number ‘0’ while a shiny spot reflecting light will be considered as on. Hard disks basically apply the law of magnetism whereas static memory utilizes electric charges on passive devices like capacitors for recognizing number systems. The numerous patterns of 0’s and 1’s are obtained from the devices or the computer’s internal hardware corresponds to various representations of numbers in decimal and other formats. systems
  • 3. Page 3 of 8 Chapter: 1.1 Data representation CONVERT DENARY NUMBERS INTO BINARY AND BINARY NUMBERS INTO DENARY UNDERSTANDING “BITS”: For the sake of understanding, binary numbers can be broken down into their smallest representation called bits The easiest way to understand bits is to think of them as digits like we learned in first grade. A digit is a single place that can hold numerical values between 0 and 9. Digits are normally combined together in groups to create larger numbers. For example, “6,357” has four digits. It is understood that in the number 6,357; The 7 is filling the "1s place" The 5 is filling the "10s place" The 3 is filling the "100s place" The 6 is filling the "1,000s place" So you could express things this way if you wanted to be clear: (6 * 1000) + (3 * 100) + (5 * 10) + (7 * 1) = 6000 + 300 + 50 + 7 = 6357 Another way to express it would be to use powers of 10. Assuming that we are going to represent the concept of "raised to the power of" with the "^" symbol (so "10 squared" is written as "10^2"), another way to express it is like this: (6 * 10^3) + (3 * 10^2) + (5 * 10^1) + (7 * 10^0) = 6000 + 300 + 50 + 7 = 6357 What you can see from this expression is that each digit is a placeholder for the next higher power of 10, starting in the first digit with 10 raised to the power of zero. The power of ten decreases from the highest weighted digit (on the L.H.S.) to the least weighted digit (on the R.H.S.). The binary number system works exactly the same way as the decimal system, except that it contains only two digits, 0 and 1. Like this“1011”. How do you figure out what the value of the binary number “1011” is? You do it in the same way we did it above for 6357, but you use a base of 2 instead of a base of 10. So: (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) = 8 + 0 + 2 + 1 = 11 You can see that in binary numbers, each bit holds the value of increasing powers of 2. CONVERSION TECHNIQUES: Let us now understand the basic conversion techniques that basically run in the background of every computer system that is conversion from denary to binary and binary to denary number systems. 1.1.1 Binary systems 1.1.1 Binary systems
  • 4. Page 4 of 8 Chapter: 1.1 Data representation DENARY TO BINARY: Binary number system makes use of bits and 8 bits comprise of a larger unit called byte. In the decimal system the number 34567 could be represented as: 10^4 10^3 10^2 10^1 10^0 3 4 5 6 7 In binary the number 11001 could be written as: 2^4 2^3 2^2 2^1 2^0 1 1 0 0 1 EXAMPLE OF A SIMPLE CONVERSION OF (73)10: Example: Let us consider a number 98 and convert it into binary system and take it step by step: To do this, we should check the following: Does the number go into 128? No. so this becomes a 0. Does it go into 64? Yes, so this becomes a 1. Does the remaining 34 go into 32? Yes so this is also a 1 Does the remaining 2 go in 16, 8, 4, or 1? No so these are all 0′s. Does the remaining 2 go into 2? Yes, so this is a 1. Since there is nothing left to compare with 1, it becomes a 0 by default. 128 64 32 16 8 4 2 1 0 1 1 0 0 0 1 0 98 in binary = 01100010 The largest number we can make with 1 byte is 255. So if we wanted to make a number which is larger, we would need to add another byte. 1.1.1 Binary systems1.1.1 Binary
  • 5. Page 5 of 8 Chapter: 1.1 Data representation BINARY TO DENBARY CONVERSION: The term bit is short for Binary digit. So 8 bits combined together make 1 byte. Given“10010111” as an example. 128 64 32 16 8 4 2 1 1 0 0 1 0 1 1 1 To work this out, you multiply the numbers which are a 1 by 1 and add them together to give you the decimal number = (128×1) + (16×1) + (4×1) + (2×1) +(1×1) = 128 + 16 + 4 + 2 + 1 = 151 BYTE AND ITS USE IN MEMORY SIZE WHAT IS A BYTE? A byte is a series of 8 bits (enough to represent one alphanumeric character) processed as a single unit of information. A single letter or character would use one byte of memory (8 bits); two characters would use two bytes (16 bits). In other ways, a bit is either an 'on' or an 'off' which is processed by a computer processor, we represent 'on' as '1' and 'off' as '0'. 8 bits are known as a byte, and it is bytes which are used to pass our information in its basic form “characters”. An alphanumeric character (e.g. a letter or number such as 'A', 'B' or '7') is stored as 1 byte. For example, the letter 'R' uses 1 byte, which is stored by the computer as 8 bits, '01010010'. A document containing 1000 characters would use 1000 bytes (8000 bits) Note: many non-alphanumeric characters such as symbols (!, @,#,$,etc..) and foreign language characters (Arabic, Japanese, etc..) use multiple bytes. A kilobyte (KB) is 1024 bytes and a megabyte (MB) is 1024 kilobytes and so on… USE OF BINARY SYSTEMS FOR SPECIFIC APPLICATIONS It is useful to understand that computer systems are capable to perform specific and user controlled and oriented applications like robotics, power systems, and digital instruments and so on. Controlled devices 1.1.1 Binary systems
  • 6. Page 6 of 8 Chapter: 1.1 Data representation usually contain registers which are made up of binary digits (bits). The following example shows how these registers can be used to control a device. ROBOTIC SYSTEMS: Robotic systems rely on processors to access user provided values and data. It is essential to note here that all the data is sent via the processor in a binary format so conversions and storage has to be provided by the processor. Example 1 The device on the left is a mobile trolley with 3 wheels. All three wheels can turn left or right and each wheel has its own electric driving motor. Sensors at the front and rear of the trolley detect an object in its path which would subsequently stop all movement. An 8-bit register is used to control the device.
  • 7. Page 7 of 8 Chapter: 1.1 Data representation Therefore if the input is for example: 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 front wheel turns left - Back wheels turn left - The direction is forward - The motors are on - Hence, the trolley is moving forward and turning left. (i) What does this register mean? “0 0 0 1 0 1 1 1” (ii) How would the following be represented using the above register? front wheel turning right back wheels turning left moving in a forward direction motors on no object in its path Answers front wheel not turning left or right Rear wheels turning right going in backward direction motors on Error – object in path So the vehicle is going nowhere. (ii) 0 1 1 0 1 0 1 0 1.1.1 Binary systems
  • 8. Page 8 of 8 Chapter: 1.1 Data representation EXAMPLE#2: SENSORS IN PRINTING DEVICES: Three sensors are attached to a printing device, with three alarms attached to the sensors. The first sensor, "A," detects if the device needs ink. The second sensor, "B," detects if the device needs repair. The third sensor, "C," detects if the device has jammed paper. If the device jams or needs repair, alarm 1 sound. If the device jams or is short on ink, alarm 2 sounds. If two or more problems occur at once, alarm 3 sounds. It can now be implied that: A=1 refers to “low ink” B=1 refers to “Device needs repair” C=1 refers to “device should jam” The outputs to the system are as follows: A1: alarm 1 sounds if B=1 or C=1(either of B=1 or C=1 will result in A1) A2: Alarm 2 sounds if C=1 or A=1 (either of A or C being true will result in A2) A3= any two or more of A, B, and C being ‘1’ will result in A3. Let us now look at the cases that will form: A B C A1 A2 A3 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 Questions: 1) What binary values can the register hold to alert the user of a “low ink” situation? 2) The register is holding “010”. Which alarm will sound? 3) Is the system accurate in telling the user of exactly which problem is being occurred? Point out any one situation where user is misguided? Answers: 1) 010, 111, 111, 111 2) A2 will sound. 3) No. System has the same alarm for one problem or more than one problem. E.g. 111 could mean that all three problems have occurred but 111 can be received even if printer is “full on ink” or not having “jammed paper.” 1.1.1 Binary systems