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

Adobe Scan 04-Feb-2024

The document provides an overview of computer components, including the CPU, memory types, and input/output devices. It also discusses programming concepts such as algorithms, data types, and conditional statements. Additionally, it touches on logical and bitwise operations, as well as the structure of programming languages.
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
0% found this document useful (0 votes)
7 views

Adobe Scan 04-Feb-2024

The document provides an overview of computer components, including the CPU, memory types, and input/output devices. It also discusses programming concepts such as algorithms, data types, and conditional statements. Additionally, it touches on logical and bitwise operations, as well as the structure of programming languages.
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/ 20

of a Coputer

the coMoNents
wle)
Ila) List
function ((aock diagram, a
it6
syston Exfain
(omAutor) ComPutcr,'.
Cock dliararm a
sstcm is an at0angaent
.A opmptea:
Cofremts they are
o thec
) Thut device
Psotesing unit (cu)
) centay device
3) out At:
) ZnPut device !: Tnput evice is noting but
which.s isedised to 'sugply TnAt to the
Machine

Ae mainly etti vity of cPy is to Poaegs


the given inlut. Iy CPU, thexe, are 3(yfes
ofnteoral Comforents named. as
ALU
* coytoc Unit
3) out At dence
The Kesuttant infosmaton , after PocSiy
data is khowh a out ut
the inpt is 9NCn to the nechine
the Po o chutactexs. di9its ox alPha
is'
Cuh. Muti Picat ion, divi_ion k Modu Ious
YumyeS
The dateu thet is StorC in tthe diision(t) the maln Job :f ogicak unit
Machine jh the Pam of o's ond Is Whic. is uceN to oMpare.
Lhich is vown as bimaiy hfaso): Contodt vmit.:
eiaty mexnai is aa combiynation o The vinly activity his uny it
t0 USed to

tx: oll 0 is to memey nd me Me mosy to A


Khowh as binary Por mat out put devite.
MCMOry Viti
Memeoy nit is the hêart evtry he vesuttont Tnfmaton ia Noting
uchine ih which it is ed o stoe
Monidoo, Prines plotteY, pojectes .
The memay is ivded ihto 2tyres lo) ofleznce betten astlicatin stvaxe cnd
2) Temfosaty Memoy
ihe per Mant SStem sftuaae
Memoy is kncun as
Lom.
1he tcntosaxy niebJy iS tirg use to Ddefate n ds pex the user
but when is Mot saved. ih the memo3y blw he aitcn
and sxem. Teguieent or vegueGt
fx RAm
¥ Tt is develofed low
Abthe matiC and logical unit is used to he alaten is
(evel tagUage
efom tulaticng ade comutatios develoRd high level
tanguyes
XEt is Dngtalled fes 2) 8 (what is al]ovith m explain the
attodng ko uset
yeuhément Prfeoties inYolved in the doyeloPe mPnt
isDniskales
Ihde Ronsently Independently . he Sep by step Pooces is a lled
¥ex! Coneiler, Jebuggey an algoithm
pofexties4 an agorthm! t followC
2)) Cxkain brsly abocet row levelr and higs
the Aive tyes o Pepes ties.

i) out put
defniteness.
tiS a machi ne ) Finiteness ar
2T
oierdly tajae Canguae iv)cClecti veneg.
occufies high ) inputi An algoAn Shoud tave

-stend to ) aut Puy An algoithm must have at leat


.t is Com plex to onl out Put.
yIt mai rtanle
0e bug .
s. The wain tanee
Veoy law. ii) Einitenes An alg aitom shoue
Should tave a
S,he ajntnte kinitenumger f stees to Solue the
vesy high. veoy tow. Pooole.
6 t is yon Pootable DPinikess: evesy statenent n algorithm
7.7t is nchine 7. Tt IS ma chi ne Should be Jefinitenes .fvery tep must
dependcnt in depondent Le cleay on the poevios tep.
¬Pctvc hss En Agorithm Shoud have
6Pec ti ve hess and Po Cel to find tle
Pt cny cne. the pogyamme.
Pre(eSs of coeating and
d
3) ) Cwbiythe Pao(eS; pcpewme
(omeling and eiecution of

Deche he as s4m values

Tnilitize a, bvaluêr

Caoeile Conpile the rgoamme


Pint a/ue

Sys7e
cibooy

ereutl ohject e
togic and

NO
DiSPay out Rut
Stop
EL: int. YJ,2 , i| asiale declanatin
(A
ine oent fecton
megsectibn (oeena) were thanto ) mgel tinec
Heades file kssetta )

Glebad funttBon ( ) He odey ting:


Thee nes ase ged
instauct ion to a Prgye e thege oge
Poe defree Gines
Variable declatation Sateent' Ex: # icude

# ude < mash h


Comnent Sectia.
inCthe abre CIample eyy he oey
n Yproptanming the comment le'sendG wth h" eztesio
Setion
is the DPticna| laterent. the
section can be sed to hile the olecta Defined Ples:
These drta oes ot be eI
7he comment secton age ecutl.
) Single cine comient mainly two type.
tyPs that cs e we have to., use the
i) Multiple Lihe Com ent section section e'uSe the efih.
The snde tine tomri ent Paction
to hieos) to
Comot chly one cine .
Gobal fantion: glote merts .
hese ebaf Ronction ae detkeed The çet o ines wiçh aaC used to
b$Es tkac the mn ction. ertie. the Pognne is lle slate ent
br;
upon theìx Choce. (oal vaga des o functon!
These setion we iýe to cld tre ney
yasiayies befese the declasat ion od aßo cdd
declagt ion
Staxts hSoe punction tike uses defined los)
function
kaeheteg tHeasder
,evey
the main function enàs a ctsed Culy
to cheik Cuiy
boatess G}
The mainh Anctiers )) woite
ies
vosiales ctatements thl dèclagntioh a shoot, note on basic deta
tyres thot the c'lan guae saPRst ilvstyate
jaiabk Aeclaation with eXamfles
ihese ae used to declaye the
VasladeWith the help dota tyfes. ollct ion he ee efied, data ty.
int hese aye avaiable jn the key kads.
data ty pe Vagioeg. Majnly these a two tyes.
float
Choy
hese o) chtactC: ChX is te one
b NuMeoic data type! e data
to' ubeos type it allows oNy single chayuctes
oMb)natlon . aen be epSCnted with the
helpc Sirgle eyution

ch Joc '
.ß), Dr teges ata These itges oteta typ b) strmy deta tyre:
ateus only the ea/nmbeas. These cta type allows moe than Iox mse
chacteas;
* t ocupies the It an be 2epeSenket with the
two bytes of remey dbuble kateton
i) loatin! data tYR these data tyes
allews. both
yln Prnctienal .Value.
f is thg ortoo l stony. si (bik) ont) sng
day (o) single cha &
wn sighes chy
2.NÛn - Nunexic dta tye These int (63) single iht ! 16 d
data tyes
llaus
onlyChatoctes- only ome aSe dy shot nt ()
héje oe sihed shot nt
) chasactty
ainly two tyRg
32
32 Condjtiono oPebotos : The
Poat 32
cond/tione opets
are,usd to he( he Conition )n
64 .! between the tWo
doubfe
OPets. fyesy tine these expessjen
eI
Checks he /ue and dstey the
)
EXpain the vazious elational, dition zesuat alue, it is tisfied .

bit wise ORXts in c with eTanle


Relationa oPetetoS:
These telotioa ofeateas aye sed to Bitwise opRtor These ofexta peafems
Geck the atton between the two (oa) theis
fesation usig the bit alue (0) aty
ofesants These ofet oOs ae elassfied into 64yPe
y Tn case the
the esut selation is tsue to disoy WBit Wise ANDofcatos (R)
SyMbo
2e30othes wise one () Bit wi
Maniny exampe. ) Eitwise ro oftato (n)
Less ttan ab
grater than azb
cess than ot.
(vi)
(U et wise AND esato
ua to * Thee AND ofdo Pally de fends uPon
a! the
Not equto ae thejr de Catetion .
These elaes ast Ceme ted to biay
ocll, hera decjma/ values.
is sed to tn that (aso the inRut
dtons )n betska, lalue is yue j an be inyes ted to
false .
.he inut valu e is alse Tt oun be
Covested

Ex Nlol olo
Ghifl
oR opet aoe to check the b't tevel ) 1eft shi/t oevt, These ceft
oftatins uscd to ota tye and ofe ant! 6Pesated used to Shpting the
deta Psom one sition to anothe

These Xo2 ofteto


is ued to Check he tonditon Whethey sed to shiptig he valies
it is Tre fase. In thot Case
the Piyit
out Put ue cthex wse false o pesat .

NOT
Oftbts The chex nal
NOt ofexatoo is on e's
Conpenet
4) ey Plain the Vazous gical opctct wth
eroMOle.
Logical fesates;
Void aìn C)
Thee
to check the (egic in blw the 2or Moge
oPeonents
Mainly thee tgicl ofesatos ax
Print 2tyPes .
("enttrthe ab ldhe
(i) AND ofesatos (kR)
alb); ii) ol oPesa too (!)
Psint (oeteo thon AND oPeatoó
'ida b) These ANeOetas ae used to checkk
the lgic/in blw the
2 iofeatry.

getch () alb)
Not ofeato
Vasiable =exfessich
Vasia ble is
an evalid c ariable name
statemernt is ehtanted the
When the stateMent
ezPoesion 1s elaluated Pinal and the vesult
y vs'ng operatoo WC can use
thege
then oeplces the Paevious values o the
one expSon SiMAY. wl tan wite the voajable on left hang Side
Symbo)
EX' # incude <stdio.h7 24 20, -2/4 t2/.s oferation )
Vojd mah C) 2t lo- 21, +2 Y.s loferation /)
2+ 10 - ot 215 (orerationl)
int rb,Cid CSE; 2t 0 -oto loPeratron on)
2+ lo-0 to (oftt oti no )
Psint P("entco the abfd Values ") 2-oto
(oferatiom cn -)

Printetne vesut =hd,cse); ;L

6) what is an
exfoesion evaluate 2+h t
(A) ExPessien:
ExpresiamS are e Valuate usihy
asign ment stalement an
Unit -2
stotc ments

eoson mei ng pecison locfig


statCMCN state ments

conditicnal seien UNonitin


StotChen kevert otteol)
kese boqk
bontinye
SwHch
Stodcent!
A
stalhrent ayn be uscd to Chep he
Cord ition

Noinly thee ae two tyres


)pecision making stadenent
2) eision (oofny satement:
co nditional /Selection
statement
These cond ition) Stete ments ae uel
o check the
Condi tich evesy time whey a
Proyo amme el eeutis hese ae
) ip stalement (o) one meniMy
way selection stateNent
) -ese statement (07) Two lwoy
Selection statehet
c-Pooam to chec the biggeSt
SedChtent f two num bes using i (oMition.
4) switch statehent 1 Indude Cstdit h7
VT state menti stt incude < Conjoh>
Void ralnC)

ad s we to ontthe Plow int a,b,


exXution Stestements

so3* the ordition txe then it Aint tho


Satthent i/ (a 7b)

(consion)

floy chast!

skottmotH
guchc) Primt eise táe
(n)while clsCr()} MaVan()
d give
( h
"/n umbe
d
is an
am
is
not an
Amstng am
stony
StONgMot 0
nuner, nmbeo

sumj sum]

EX! tooP
|234 putteon
I2 nar S
automatically * erawe
<conio-h
inciude > 32 wYte Lt
Voihtadr ) then
surse Is
a check tlnes
<stdioh uge
Arg termiate the
ame thl bo
oiditin Check
the eond
to
top. anaition, is the
Abt toue
th condition
e to
felliry Cntre
te in
V)
VeEson cisionde yn
ar er
WhenValuate e ways
two on
Phin getehC) 3 or
yatlobeone
list;
the
may Aate
SWitch
on
ierS;
met, about
Conai
tjcn i
expssKnthe condi
SWitth
ese slatenent
That itt)
tion
block ic
a sieteent
S sinPlified
that is
usd
a
evald mutny With
m

Case 3
byeok Switch

(ose Chazt
flow
i:
->
sttement conditien
Switch

Staterent N ’
bask
Unit TIL
Whet arTay) cPin dileence
yPes c aey How to intiali ze, ace sing
aMA Po t the element in an atta,

a colletion Simar
data and it can 6e called as aanizue nayne
hamme Must be uscd to a bade

d mentroya
2

one dimentionaf#oy (rotbay )

Dada tye Aayome (size];

i uy ganpt) Punction (os) S fonction


We Can Value
By usny ihet faCfing the AaMot
be sad one b ohe ih 20 aooy .
Synker:

Sah
Som) es

cls co ))

pint "in ener e gonent in metrix


eemtnts are

Por
it)

3
Jiven mot rin.
indude <wiloh

3.
Ia) whot axe the apeliottns ar y.
These

matix oRrteis
substractiÛn , Mullithceon atd
trsPartion
aye ued to ieert the soch

to jelemort cP4

You might also like