100% found this document useful (1 vote)
6K views310 pages

Tech Simplified

Uploaded by

Jay Shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
6K views310 pages

Tech Simplified

Uploaded by

Jay Shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 310

-i

DEEPAK SINGH

,.

I .

Sim----~ lit ied


For PMs and Entrepreneurs
I

From Basics to System Design


written at an 8th Grade level
. .. .

Tec h Sim plifi ed


For PMs and Entrepr eneurs

Deepa k Singh
Edited by
Priya Singh
l
Introduction

The idea of 'the opposites attract' has been there for a long time. In
2016, a long- term study upended the idea, suggesting that we're
drawn to like-minded people. Here is an excerpt from the study,

Picture two strangers striking up a conversa_tion on a plane.


From the very first moments of awkward banter, how similar
the two people are is immediately and powerfully playing a
role in future interactions. Will they connect? Or walk away?
Those early recognitions of similarity are really consequential
in that decision. c11

We· experience this phenomen~n in real life regularly. In a foreign


country, it's hard to connect with local people if you don't speak
and understand the local language. On the other hand, finding
comm on groun d with anyone builds a good rapport with them.

So how does this apply to a PM or a founder role? Anyone working


with software developers will find it ·hard to connect and
communicate if they don't understand tech. There are other
benefits to understanding tech too. You can build empathy for the
development team working day and night with you. This creates
mutual trust and respect, which makes it easy to work and get work
done. Havin g tech understanding also helps in building your
confidence as a PM.

So it is no wonder that all the product leaders and CEO s of tech


companies under stand tech very well, even if they didn't have a
· degree in Comp uter Science or a background in coding. Excelling
· on the job requires them to do it.
Table of Contents
Before We Start
1. )"he Problem With Tech Literature 02
2. To Learn or Not to Learn Coding · 05
3. What You Will Gain From the Book 07
4. How to Read This Book 09
l.

Co~puters
5. Why Data is The New Oil 12
6. The Language of Computers 14
7. From Transistors to Computers 19
8. Performance of a Computer 23
9. Buying a Laptop . 31
10. Moore's Law 33

Software
11. Software is Eating the World 36
12. Programs and Software 38
13. Operating Systems 40
14. The Popularity of Microsoft Windows 44
15 .. Open Source Software 48

Internet
16. The Competitive Advantage of the Internet 52
17. How the Internet Reaches Your Home 55
18. WiFi and Small Range Networks 60
19. Moving Data Through the Internet 62
20. Protocols to Make the Internet Secure and Reliable 67
21. Data Encryption and VPNs 77
Websites
22. World Wide Web 82
23. Dynamic Websites 89
24. Database 96
25. NoSOL databases 103
26. Programming Languages 109
27. Bringing it All Together 113
28. How Google.com Works 114

More Dev Concepts


29. APls 120

30. Frameworks and Libraries 125

31. Data Structure 127

32. Algorithms 131

Mobile Apps
33. Mobile Apps 140

34. Mobile Operating Systems 142

35. Building Mobile Websites 144


•' .
36. Building a Mobile App 148
37. Launching the App 155

DevOps
38. Stages of Code Development 160
39. Version Control System 163
40. Git and Github 169
41. The Birth of DevOps 172
42. Testing and OA 180
:ZS Q ;;z. .._ CZ L • -& «~~ ;.::; >MM w: I iWt)t it

l
43. Cl/CD
I 44. Setting up an IT Infrastructure
184

187
45. Cloud Computing ' 189
46. Infrastructure as Code
192
47. Microservices
194

System Design
48. Why PMs Should Learn System Design 198
49. NFRs
200
50. Scalability Through Distributed Systems 202
51. Load Balancing a Distributed System 207
52. Performance Through Partitioning 213
53 . Performance: Caching 218

54. Availability and Robustness : Redundancy+ Replication 226


55. Communication Protocols 229
56. CAP Theorem 232
57. Choosing a Database 234

Architecture Of Popular Apps


58. Approach for System design 242
59 . Building a URL Shortener Like Bitly 245
60. Building a Social Media App Like Twitter 251
61 Building a Marketplace Like Airbnb 260
62. Building a Mobility App Like Uber 267
63 . Building Messaging Service Like WhatsApp 275

How To Work With Tech 285

Epilogue 289

A
01 · Tech Simplified

-. Before We Start
Befo re We Start · 02

The Problen1 Wit h Tech Lite ratu re

Back in 2014, the tech scene in India was rising, and I


join ed housing.con1 - an online real-estate portal. To improve rigor
tics
in decision-n1aking around products, I built the product analy
ing
team there. Lead ing the prod uct analytics team meant work
,vith a diverse set of talented product managers. This was my foray
and
into the worl d of prod uct management. I loved the autonomy
responsibilities that came with the PM role.
at
Two years later, I n1oved into a PM role at upG rad.com. Whi le
upG rad, I buil t co~m unity , data, and growth products. And since
then , I have fallen in love with building products. I have built both
0-to -1 as well as products at scale across multiple domains.
AI
Mos t recently, I got the opportunity to lead the Conve.rsational
orm
prod ucts at Flipka.rt. Flip kart is the leading eCommerce platf
best
in Indi a, and this role involved working \1/ith one of the
the
engi neer ing and data sciences teams across t!1e globe. I led
as
deve lopm ent of voice search and shopping assistant products
head of Con vers ation al AI products.

In this journey, I have seen both the struggles and joys of the job. A
job
key struggle has been learning the tech needed to do the
r in
effectively. I grad uate d as a chemical engineer with a mino
a
math ema tics and com puti ng from IIT Kharagpur. Com ing from
prem ier insti tute like IIT, I didn 't realize I would struggle much
with learn ing tech.
03. Tech Simplified

weve1, . I di·d, and there are n,vo reasons fo r that - the r d


H 0 ea abil"
tecl1 liter ature and a definite syllabus . Let me elab tty
0f 1 orate 00
readability first.

Readability
Most of the tech lite~ature is written by techies for techies. So
techies don't find this literature hard to read and understand.
However, someone without a computer science background would
find it hard to understand. To quantify how hard it is, we can use
readability scores. 'R~adability score' of an article determines how
easy or difficult it is to understand. It is measu.red in,either absolute
score (1-100) or grade level. A lower .grade le,·el is better since
more readers can easily understand it. Any grade Je,·el below Grade
9 is considered go_od. As an example, Ernest l-Ieningway's work is
estimated to be between a 4th and 6th grade lev:el of readability.
TI1at goes on to show the simpliciry·of his wr.iting.
Here is an article on 'Software Testing' written on ,Vikipeclia.com.

Sofuvl!e t~lin~
.........
,,,,., .,........
=~:.~•~ •~ •~•.....,.._,,_.Wuf'll.lW.Wl•!lld••1.1 ••o,iy"'11~w.••cpodn•1"M"".c. '~ ,Mtl~ IIIC'l8'1

C..1•••·'~
....,.,.~...:,.CMl
h l t = a : : : . - :·= - = · •• .ot1•• t.111i»#ltil~•IOl(,(W:'l•anl ....,,,~,-•c;a ol ~'Ji l N.iui 1klvckl? ni1n:
n....._....i,. - ~ Nllllt. .•• Jin!Mlil. lill li:,,""4,, tie •PDf1M111t.,.,i,c,,1onw.!ll t"-lnl..11lulh'IWl:1' uot ,~ ) I ., J •,.,. 6'1,IIIM 1,r~,11
,lll.lrt,.t,\ L~
, .. , J..... .. . . .. " ..:..1
~ . _,. , . _ . . . h ~ d aNl',..Yr,,~ ~, ~• o, •l'NlW
......~llldlc.aio-~lt Mdl ... ""'. . .... .,.,.... \ l l ' . l : : : - lo ov.....,OllfO,M01ep~ J J , ~'ft aAllll'»--•I t-"••I
1~ 11&,lf'1f l lftQvftlfll,
l!iNlOltll'tl .......,_ •:,,; ,- J •
• IIICal.lt'lf'lq,.t--'IU M 911<1W UW-9"MI ~

--~~-
• ~oancc:1yto ll U't.:11ol ..,._,

c......~,.,.,,
•~ ,..lwfLW•_,...,~-.
11·, ,,,, ~ .,. •

....,.,......
....
- ·,•Cl<~-
"-=--'•l7•
,..,,_'"
\.- ..,,...
,., ... ~i.. .......

fl•~-···

A snippet ~f the article on Software Testin,111 .

When
G
we ch k h
ec t e readability scar f h.
rammarly, we can see th t th e o.. t is article using
> 13) Wh a ehreadability
. at this means is th score :ts. 38 (grade level
a user wh0 h
as at least a collat t edtext is. likel,) t 0 I)e understood by
ege e ucat1on.
Before We Start• 04

Readability Metrics compared to ot~er Grammarly users


,,
' ♦ I •

Wo'rd length • .l 3.3 · - Above average

Sentence length '\ 8.4• ,,_ Above average

Readability score 38 CD

Your text is likely to be understood by a reader who has at least som~ colleg~
education, but it may not be easy to read.

r ..
Readability Scorrf11

I have checked the readability ·score of multiple topics iri tech.


Almost all -of them hiave =a college/ postgradu;te level req~irement
and are hard tt> understand: The low readability comes from the
fact that most . of this literature is written by tenured techies.
Experts in a fielcl usually suffer from a ·cognitive bias called the
curse of knowledge. The curse of knowledge occurs when an expert
individual, who is communicating with beginners,· assumes they
have the backgrqund· knowledge to understand. - -
. .

The problems in.'the' readability of tech literahlre are the primary


reason to write this book. To ensure most English readers can read
and understand this· book, I have written this book at an 8th-gr;de
level with a readability score > 60 for all sections: Wh~t this means
is that 80% of th~ average English readers be able to will
understand this book.

Definite Syllabus

Besides readability scores, the other reason for the struggle is the lack
of a defined syllabus in tech for PMs. Tech is vast and keeps evolving.
As a begin~er, what_you read and what you avoid becomes hard to
determine. I have tried to solve this problem through this book.
W _h at gives me ·confidence around this is my own learning building
deep-tech_products and my conversations with fellow Pfy1s.
05· Tech Simplified

To Learn or Not to Learn Coding

' .

One of the key questions PMs often struggle with is: Do you really
need to code to be a good PM? Another way to phrase this
question is - "To what extent should you understand tech as a
Plvi?" .

The most common answer that you get around the question is, "it
depends on the kii;id of products you are managing." If you are
managing products like recommendations and search, you need to
be highly technical. On the other hand, ifyou are managing a blog
or ne~s website, you don't need to have_that level of technical
depth.

The problem with the "it depends" kind of a,n.swer .is it doesn't help
in bringing clarity and confidence. Instead, fr co_nfoses you because
now you aren't sure what to do.

To bring clarity, we need to break techni~a} depth into different


ievels and understand how mastering those levels can help you.
Once you understand the levels, it's easv., to unde
'
rstand ~hich ones
are needed for your role.

Level 1- I have no idea what anyone is talkini~ about.


This happens when you are new to the job a,id have no Co~puter
Science background. In this phase, you keep hearing the words
engineers and fellow PMs use and wonder what that's all about.
This is not a good level to be on, even as a fresher PM. Your goal
should be to cross this level asap.
Before We Start , 06

Level 2 - I broadly understand 'what's being said.'


After working in the role, ~or 1-2 years, you start understanding
what's being said in meetings. This is where most PMs stop
learning because they know enough to get their job done. However,
this isn't a good enough level for PMs. The reality check comes in
when you start managing products with good technical complexity,
only to realize that you are faltering in technical rounds.

Level 3-1 understand 'what's being said, what's important, and


the implicati~ns for my product.'
This happens when you have started investing time in actively
understanding tech. You can understand how tech works, talk
comfortably to engineers, and clear tech interview rounds for most
companies. This.is a good level to be at, and you should definitely
reach this level to progress well in the PM career.

Level 4 - I understand every technic~ldecision in detail.


You have beeri readi'.ng technical docs and ate · also involved iri all
technical architectural decisions. Usually, you don't need this unless
you.work on a·deeply technical product 'like search,'AI, ML, ~etc.
~ " w • .. • • • •

I '

Level 5 - Let me write code.


You are either a CS graduate or have spent a c~uple of ye~s writing
q:>de at a job. Fionestly, you·don't need to do 'this as a PM. Avoid
this tendency at" all costs. · · .- · · · · · "· ·

So we discussed the five levels of technical understanding. Coming


back to the questiort - "Do you need t~ code to be ·a goocl product
manager?" The ·answer is no. As a non-CS gr~duate, your _goal
should be to mdve to level 3 quickly and e~en~ally" to leve~ 4.

If you finish this bpok, you _w!ll be able to rea.ch,level J. If y~m


understand aAd· retain everything in this book, you wq~l~ be at
level 4. · :· ·
So how would that happen? Let's discuss this in the next section.
07· Tech S im pl ifi ed
F ro m th e B o o k
W h at You W il l Gain

to co ve r in th e bo ok? Let's start


e w e g o in g
If no t coding, w ha t ar
with th e en d goal.
a
ec tu re o f a pr od uc : is qu it e essential to
ch it
Understanding th e ar :
re ar e ny o re as on s fo r th is in pa rticular
P.~·1's jo b. The
-l ev el ar ch it ec tu re he lp s yo u identify
hi gh
1. The knowledge o f ca n ~1a ve co nv ersations
ad e- of fs . Y ou
and articulate tech tr
gi ~~ er s an _d he lp in pr io ri ti za ti on .
with e~ . d et-~r.: ni ne th e
user
o f ar ch it ec tu re
2. 1l1e limitations ta nd s :h e relationship
w ho un de rs
experience. A P M .:a n an ti ci pa te the
ch oi ce s an d TJ X
between architecture ra te
t pr oa ct iv el y. F or ex :1mple: th e bo un ce
problems and ac a
nd s on la te nc y, i. e. , tirne ta ke n to lo ad
o f a website depe ab il it y o f bo un ce
G oo gl e, th e pr ob
~age. According to fr o1n 1 se co nd to 3
lo ad ti m e g oe s
mcreases 32% as page k .1nal· d eC·1s·1ons to
M h ld c th e op t1
seconds·r 1 A ·P s ou m a
3

drive latency down.


d 1
In this way, understandi h n1es th e en go a ·
t e ar ch it ec tu re ~e co d
By the end 0 f th'1s hookng be ab le ro un de rs ta nd an
' you sh ou ld ·
come up w1·th th e h' h o f an y ap p/ vv eb si te
independently. ig -level architecture

So what topics do w
e need to cover t O understand th e ar ch it ec tu re
o f a prod uct.~ L et'stak e G0
h. ogle Se ch as an ex am pl e. 1o u n d er -
stand the arc 1 tecture o f Goo ar
g1e Search E ng1n
.
e, w e ha ve to cove1~
• 1--lo"· do cs G oo ~l c "' l't k '-\\
\ ,, h,~h \\' \'''~
• \V ha t docs the s~f~,':Mt d~
,· \'"'"~~~
,,, ~\\\\\\' \ 1,,,~\\,\\' '' ,h \~\ ,,.,ti
• H ov i to scale th e sc~rch cn
~\nc t(, ~( l\' \' b\\\\\,n j ,,\ \\\\ ~
'\'-~
To anS\\'Cr th e~ e qu es tio ns
, ,ve h,\\~ to COYC\' th(~,-,'\'
th e di ag ra m belo'\v. k~ \\ H\ \'\W I\ \ \\

Qu es tio ns
To p\c s

Ho w Goog\e, co m
wo rks Co mp ute r, So ftw are ,
\n tem et

So ftw ar e
de ve \op me nt We bs ite s, Apps,
pro ce ss 0e v0 ps

Sc ali ng the
pr od uc t Sc ala bil ity Co nc ep ts

Topics to Ccit.~r to Und~rsta


nd Architecture

Th e ch ap te r an d co nt en
t in th e bo ok ar ~ se q{ ien
le ar n th es e top~c~ in an ea ce d so th at yo u
sy -to -u nd er st an d m an ne r.
O nc e do ne w ith · th e to pi
cs in th e bo ok , yo u ca n fu
un de rs ta nd in g us in g th e rth er te st yo ur
on lin e pr ac tic e lin k sh ar
en d of th e bo ok :·T he qu es ed to w ar ds th e
tio ns on th is lin k ha ve ap
ro un ds of PM ·ro les in va pe ar ed in te ch
rio us co m pa ni es . I wi ll als
ne w qu es tio ns on th e lin o ke ep ad di ng
k ov er tim e. Be fo re w e be
yo u to ke ep a fe\.v th in gs gi n, I w ou ld lik e
in m in d, as co ve re d in th
e ne xt se ct io n.
og•Tech Sim plified

How to Read This Book

r a_ro"u nd the future


Yuval Noah Harari wrote a compelling chapte
2h t Century". Here
of education in his book "21 Lessons for the
y. I ~~ve simplified it to
is an excerpt that resonates with .i:ne strongl
P.~-~ts irrelevant .to the
retain the central argument while Josing the
core message.
f!1ming information .
At present, too many schools focus on ·cra
rmation was scarce.
In the past this made sense, because info
pers or public
There was no radio, television daily newspa
en modem schools came alon g, teaching every
libraries. Wh.
-
basic facts of
_child to read and write and imparting ttie
ented an immense
geo~raphy, history and biology, they rnpres
improvement.
are flooded
In contrast in the twenty-first century we
by enormous amounts of information. With
c smartphone, you
dia, watching
can spe nd many lifetimes just reading Wikip,?
TED talks, and taking free online courses.
In such a world' th e Iast th"mg a teacher ne,:ds to give her
. . .
.
pupils 1s more inform at"ion. 1nstead, people- need the ability to
_ .
make sense informat10n,
of .
. . to tell the oiffereryce between
what is important and wh . .
combine . at is unimportant ond above all to
many bits of information into a brJGd pic .
ture
of the worldJ4J
=
Before We St ar t· 10 I
You sh ou ld ke ep the above passa
ge in mi nd. wh ile rea din g thi s
bo ok . Do n't try to cr~m the
wh ole inf orm ati on . Fo cu s on
un de rst an din g ev ery thi ng . Ov er
tim e, yo u wi ll sta rt co nn ec tin g
ho w dif fer en t p;.eces of tec h fun
da me nta lly wo rk tog eth er. Ev en
yo u for ge t son1e of it, the inf orm if
ati on is available at yo ur fin ge rti ps
jus t on e go og le sea rch away. ,

An oth er thi ng to ke ep in mi nd is
following yo ur curiosity. W atc h a
vid eo , ma yb e rea d an art icl e aro un
d the top ics tha t int ere st yo u, an d
ha ve a few qu est ion s ab ou t. It wi
ll bu ild a ha bit of un de rst an din g
an y un kn ow n top ics yo u wi ll co me
across in the future.
La st bu t no t lea st, rem em be r yo ur
,. en d go al wh ile rea din g the bo ok ,
i.e., rea ch ing level 3 ·or 4 in yo
ur tec h kn ow led ge . To do tha t,
wo uld rec om rde nd th at yo u ~n ish I
the bo ok , ev en if yo u are ha vin g
so me tro ub le un de rst an din g a few
co nc ep ts.
By the tim e yo u fin ish the bo ok
, you wi ll have lea rne d mo re tha
25 0 co nc ep ts aro un d tec h. Ev en n
if yo u do n't rem em be r all of the m,
yo u ~i ll feel qu ite co nfi de nt to ha
ve a ch at wi th en gin eer s sin ce yo u
no w un de rst an d mo st of wh at the
' . . y ha ve to say.
On e las t wo rd of ad vic e - do no t
skip the first few ch ap ter s aro un d
co mp ute rs, so fnv are , an d the Int
ern et. Ev en if the y loo k sim ple on
the sur fac e, the de tai ls in tho se
ch ap ter s bu ild the fou nd ati on for
the lat er on es.

On lin e Co m m un i_ty
To bu ild an en vir on me nt of co
nti nu ou s lea rni ng an d su pp ort , we
ha ve cre ate d thi s on lin e co mm
un ity for yo u. You wi ll find
PM s/f ou nd ers in th e co mm un
ity wh o discuss the tec h top ics
me nti on ed in the bo ok an d be
yo nd . Ch ec k it ou t on thi s lin k
htt ps :// clu b.s im rli fy -te ch .co m/ -
.W ith thi~, let 's be gin .
Be st of Lu ck ! Ch ee rs, ·
De ep ak , •
ll . Tech Simplified

Computers

Ir
I

I
Il

I
I.
I
Computers • 12

Why Data is The New Oil

The economist wrote in 2017 -

The world's most valuable resource is


no longer oil, but data. [lJ

Data has become impo rtant to companies as well as governments


in the 21st century.

So let's start by unde rstan ding a bit abou t data. Data refers to
pieces of information. The data can be a photo, a piece of text,
information about a perso n like their name and phone number, etc.
We use data and infor matio n interchangeably in everyday life.

Inter net companies like Google and Facebook generate lots of data
from us. For example, Facebook knows our name, how we look, our
friends, etc., through our Facebook account. Google knows what
we are searching for and whic h websites "':'e are visiting. As these
companies learn more and more about their users, they can use the
data. for adve~tising the produ cts that users may buy. Say, a user
searched "how to complete a marathon?" on google.com. Google
can show the user advertisements around runni ng t-shirts, bottles,
shoes, etc.

Based on their users' data, Goog le and Facebook have built the
largest advertising platfo rms globally. From these advertising
platforms, Goog le and Facebook make hundreds of billions of
doilars in revenue every year.
r 13. Tech Simplified

Companies use data in other ways as well. An exainple is Amaz0


Amazon uses data related tq your past pu: cha.,e:; to recoIll~ ~n.
! k
products that you may buy. Ama zon ma cs, revenue by taking
commission on these sales. a

Once we understand how data can generate business, we can also


understand how the phrase "Data is the new oil" came into
existence. So, where is this new oil stored? '~he quantity of data is
huge, given ~hat it can be anything ranging from simple text
messages to photos t~ ·hour-long videos.

Most of you reading this may already know the answer - data is
stored in computers. B~t how do computers store everything from
· simple text to large ~ideos? We will answer th,e que:;tion in the next
section.
Computers •14

The Language Of Computers


. .,'

..

What a computer is to me is it's the most remarkable tool that


we've ever come up wf~h, and it's the equivalent of a.bicycle
for our minds. - Steve Jobs !21
'
We all have s~en .computers. .~omputer~ are eyerywhere. Your
desktop, lapto~, smartphone, s~artwa_tch - everything is-a c~mputer.
.. • • : J. •

But if you had to explain to an 8-year old about what's so unique


about computers that makes them so prevalent and useful, how
would you do it? A computer is a machine to start with,just like a
car. Machines help us accomplish tasks efficiently. For example, a
car helps us dri~e 200 km and reach another city. Without a car, it
would take much longer to cover 200 km on foot.

Is there anything .-else besides being a machine that makes


computers special? There is. Unlike other machines, a computer has
us
intelligence. It can take logical instructions from humans and
carry out these instructions. In this way, they are similar to humans.
When you instruct your friend to calculate 2+2, they understand
the instructions and ·reply 4. Similarly, if you instruct a computer to
calculate 2+2, it will calculate and answer 4. So the computer is not
just any machine, but an intelligent one .
..
Computers are generally quicker in doing speci6c tasks compared
to us. The multiplication of two large numbers takes a fraction of a
second fo~ comput~rs, but it can take us minutes. That way, they
become bicycles for our minds, as Steve Jobs quotes.
-15. Tecll Simplified ·. . .

.d. Instructions to Computt:!rs


Prov1 1n9 .
sed a smartph@ne or a personal computer (Pc
As you have u )
v the broad process to get things done 'You
already knm,. , 0 n th
e
compurer:
instructions from us throug]:, pa.rts like the k
1. It take5 e}'pad
mouse, camera, touchscreen, etc. '
2_ It then follows the instructions.
it shows output through the ~:creen.
3. Fimally, .
But how does the computer understand instructio.ns? Whe'n we tell
a friend to do something, they understand it because you speak the
same language. Does a computer .underst~.nd ;the plain English
language and numbers as we humans do? ·

The answer· is N9. Computers only under~tand binary nunibe.rs.


Let me elaborate. ·
••
We, humans, do 2+2 = 4 using a standard base-ten system. It is
called a base-10 system because there are ten d:.gits to work with:
0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Maybe we love rhis ,y,tem because we
have been counting numbers on our ten fing,:rs sin..:e the beginning
of evolution.
We can understand the decimal system :hrougl~• the way we
pronounce numbers. We pronounce 1234 a:, one thousand - two
hundred - thirty-£our. It is
· represented as
1234 = 1X 1000 +2 X100 + 3X 10 + 4 X 1

In powers of 10 (base-10) 1·t. .


, ts wntten as
1234 =1X 1Q3 +2 X 102 J
. + X101+4x 700

We can show th f .
e ract1onal digits similarl
1234.56 == 1x 10l +
2
y,
X ]02 + 3 X 101 + t, X 1 o
But as w d' . 'I Q + 5 X ]0·1 + f ]Q ·2
'X
e iscussed e 1·
system TI ar ter, comput
· iey use a binary s crs don't use the decimal
ystein. Bi mea 11 .
s two, so binary is a
lified
-15 •Tech Simp
tructions to ComputE~rs
Providing Ins
om o r a personal c· puter (PC)
d a sm artp h@ ne o
As you have use ss to g e t tb in']'s done on ,Yoh
c e
lre a d y k n o w the broad pro ,-:, te
a ,
computer:
u s thro u g l: , parts like the k
1. It takes inst
ructions from eypad,
.
o u se , c a m e ra , touchscreen, etc
m
fo ll ow s th e in structions.
2. I t then ro u g h the ~-creen.
ws ou tp u t th
3. Finally, it sbo
in st ru cti o !1 s? When we tell
n d
o w d o e s th e c o mputer understa c a u se you speak the
But b n d it b e
in g, they understa
a friend to d o so m eth
u n d e rs t, .n d the plain English
te r
m e la n g u a g e . Does a compu
sa
d n u m b e rs as we humans do?
language a n s.
n ly un d ers ta n d binary nmriber
o
h e an sw e r is _N _Q. Computers
T
.
Let me elaborate se -te n system. It is
stan d ard b a
d o 2 + 2 = 4 using a work with:
\Ve, hu m a n s, re te n d ig it s to
st e m because there a we
called a b a se -1 0 sy
w e lo ve rh is ,y,tem because
1, 2, 3 , 4 , 5 , 6 , 7 , 8, and 9. Maybe si n.:e the beginning
0, te n fi n g a s
b e en c o u n ti n g numbers on our
have
of evolution. c ,u g li ' the way we
syst e m :l ir
ca n u n d e rs ta nd the decimal e th o usand - two
We 4 o n
pronounce 123
a :;
ce n u m be rs . W e
pronoun as
n d d - th ir ty -f o ur. It is represented
hu re
X100 +3 X 10 +
4X 1
2
1234 =1X 1000 +

10 (base-10), it is written as
In powers of
X 701 +4 X 70
0
702+ J
1234 : 1X 70s +2 X

w the fractional digits similarly,


We can sho ,
2 102 0 70 •2
1234.56: 1X ]OS+ X +J XJOI + t,~ X 10 + 5 X 70-1+ [i X

But as we d'iscussed earlier use th e decim al


ute rs d o n 't .
ab ' 'comp .
st y use . rv 1s a
sy cm. The inary stem • B1 mea11s two ' so bina ,
sy
Computers· 16

base-2 system with only the two digits - 0 and 1. The special thing
about the binary system is that it is the simplest number system
.. '
possible. If we have fo reduce it further and take '1' out to create a
base-1 system, we will only have 0, and we can't do much with 0.

A binai1' systeni wo~ks similarly to a decimal system, except the


b_asc 10 in the decimal syst~m is replaced by 2 in a binary system.
A binary number, for example, can be represented as follows.
3
1011 =1X 2 + 0 X 22 + 1X 21 + 1X 2° =1X 8 + Q +1X 2 + 1X 1
=11

A question may arise in your mind - why use a binary system? Why
not go for base-3 or base-4? It's a valid question.

Why Use the Biriary System?

A computer is ,ma~e of small electrical/ele~tronic components


which need electricity to function. Electrical/electronic devices
usually have two states - 0 N and OFF. These two states can
represent binary digits; the ON state can represent '1', whereas the
OFF state can represent 'O'. For example,

A wire can represent a binary digit. If the current is flowing


through the wire (ON), the binary digit is 7. If not (OFF), the
binary.digit is 0.
A switch can be a binary digit. If the switch is ON, the binary
digit is 1. If the switch is OFF, the binary digit is 0.
A bulb can be a binary digit. If the bulb is lit (ON), the binary
digit is 1. If the bulb is not lit(OFF), the binary digit is 0.

In the early days when computers were invented, we used vacuum


tubes to represent binary digits. Vacuum tubes can represent binary
states, just like other examples above. In today's world, computers
use transistors as a switch to represent binary digits. However, a
bulb is large, takes 40-60 W to operate, and burns out quickly.
17 •Tech Simplified
we mov .
ed to transistors because they. are. tiny,
1
.nle c
0 ver tl. ,
Jess electricit}~ and don't bun~ out quickly. \iVe all love a ' onsullle
.1 ble laptop/s·martph. one that also h:1s high battery srnau tand
re ta
Transistors make that happen. fe.

Bits
Saying 'binary digits,' again and again, can. be tiring. So we carne
up with a short and straightforward word for binary digits_ bitS,
All the data in computers is represented using bits.
We have already seen how numbers can convE:rt into bits. But data is
not always numeric. Computers work with a variety of data like text,
images, videos, etc. In order to store various kinds of data, we need to
define standards to convert them to bits. One such standard is ASCil.
Vve use ASCII to convert the alphabets int; bits.·A is assig
ned a
'le ~ord "ABC,"
numeric value of 65, Bis 66, and so on. To store t~
the computer will first convert them ·to 65, 67: and 68, and
then

these numbers into bits. Similar standards exist for othe r


inputs
such as photos_,audio, videos, etc. . . .

Let's take something complicated l'k 1 ea phot o tnd see lrnw it can
"". . .
be co!iverted to bits. To store an image on ,a :...:·omputer, 1s
I . .
broken down mto tmy elements call d . 1
the
e pixe s. A pixel is short for a
imag e

I
f
PICture ELement and

.
.
.
represents one color. Tut·
needed to represent an image is
propo
.
rti-:,n
.
al
· numb
t .
e1
. . .
of pu,els

0 Jt,s qua 1ty or
resolut10n. An 1mage with a highe r
reso1Uho '11
numbers of ·
p ixels. For exam ple an • n wi need high er
, image w·,
resolution will have 9,21,600 (1280 x 720) Pixel . It.l a standard .H D
s.
For a black-and-white image, we can use 1 b·It. pt•r p' 1
11

Dee· We can
keep 1 as black and Oas white. Each pixel C.?.n be .,:tored
This '"'.'ay, a simple black and white picture can be creatas 1 or O.
h . re be1ow. Each grid is a be ed using
. t11e pictu .
.
bmary , as s own m
whole picture is a 10x10 pixel. p el, and the
I
Computers• 18

o o o o o · o , o o

■ :■: . : ■:
0 0 · 0 0 0 0 . 0 0
I
0 0 0 0 0 o , o 0
ago o o ag o
0 0 - 0 0
0 0 0 0 0 0 O O

The Binary Representation of a Pictun/ 31

What about a colo1'ed picture? Let's assume the picture has four
colors - white, blue, green, and red. Instead of using just 0 and 1,
using four possible numbers to represent each color will help us
create this image. In binary, this can be represented using two bits
per pixel:

• 00 can represent white


• 01 can represent blue
• 10 can represent green
• 11 can represent red
For the same number of pixels in an image with an HD resolution
(9,21,600 pixels),

• Black and white image would need 9,21,600 bits.


• A colored image with four colors would need 18,43,200 bits.

So depending on the number of colors needed for tpe image, we


can adjust the number of bits per pixel. Images with more colors
need more bi,ts per; pixel to store each available color. To cr~ate
high-re~olution digital images on our computers, we need millions
of colours. So how do we store data for such an image? Any colour
can be created by using different intensities of primary colours -
red, blue, and green, also known as RGB. We store the intensities
of RGB for each pixel to create a coloured digital image.

You might also like