0% found this document useful (0 votes)
8 views9 pages

Micro Assignment

Uploaded by

maheshrajboldhan
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)
8 views9 pages

Micro Assignment

Uploaded by

maheshrajboldhan
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/ 9

pAGE NO:

DATE

AssI GINMENT-3
g05) with
QOplain Bypes fo
C data 1ypes
SuHabLe Oxample
805l aEe
Vaoious C data tupcs foo
Ihe
D Unsigned Chag
3 Sighod Chae
3) Unsigned int
4) Sigñed tht
5) Sbtt (single bit)
6) Bit and srJ
OUnsiqned chag
T+ IS a 8 bH data type
It takes the Vauue Ln the ange of
0-225 (O0-fFH)

Thts data types can be used whenes


SIgned dot data s not needed
Sgned a countee vcle

Ex unsiqn ed chae X345

Sgned Chae.
J iS a 8 bt data type.
A Signed cha[ ts a sighed Vole
whttn s typically Smaleg fhan
and S ded mot
blgqee Hhan ashost fo be
DELUXE
PAGE NO.:
|DATE:

Chag data kype ín chat bocend e

Srqned chae Uns tqn ed chae

Data Brt Data g4

A Signed chae Sai Sgn NCar ohich 1S yptcclly


SrHaued than ) and iS quaaanteed not to be
bigges han a, Shost

" It us es the most s niEicant bit 3D7to


Sepo esernt tne sgn Of the clata and
mauhing 7 Ubits'aee lsed fo oepoeser
the maghttude of the gven mumbeg.
-Ve vale
Smauest' pos sible ale 27X|t 2xot 25 Xo +

Laogest pOSS6e cuuemsc7Xo 26X 4 25x1+


To
o S E o Ro 164+324 16+8444
DELUXL
PACGE HCO.
DATE

L6 Unslaed int
I4 tS a l6 bi daBa
type
ansigned integees
O. t% 65535
oange foom

. Tt 's used to dofinet6 bH mermO6y


addoes and also to set coun teg
Vaues gveteo than 256 k9iol so

unsigmod int W,y

SIgned I n t 2 i o
Tt rS l6 bit data
type
-xic t Cxet dses most
O7to oepoesent StgnifCCnt bits Öl5
h Sgnof the
dlata
The oemaning 5 bits
o gen numbero magnttude
3lalle;lt329 768 T0 32)763Ganging foom

Ex: intP q

REDMI NOTE 9 PRO MAX


PAA
DELUXE
PAGE NO.:
DATE:

Mapping of onsigned and ssigned Int

mapping sig ned e unsgncdt


1&s Signed

4
O1O]a tyd 5 ot boz5
O LO 6 6
7 7
IO00
-7

-5 t[-16 11
-4 12
13
-

6 Sbit

bit data type


Tt 1S ased to acess Single bit addresable
Specsat fenuH on oeqistesS
FX Sbtt kkoy Pr^O
koy
:.0H35a DATE:
DELUXE
PAGIE NO.:
3TAO

datt tupe islbit datatype


Ihe brts type
to
Tho but data tYpe
type dllo
ble
w aCCOSS
Single
mmemooy
borbrtSof blt add vesSa
20-2EH 00o0
tn the RAM Spaco

Ihe SfR data type lg an 88 bLt aata


type
- T4 iS used to àccoss byte Size sfR
DELUXE

DATE

A'oite Qn So5| C oogoa mo Send HOx


ASCI thaaot oos o
ols23 VawcsfOE
4 559 ABG dnd
to poot PI D

# include <oeg 5l-h>


Vord mal'n (yod)okuto

hsigned chao mynumC] = "o1234 5A8C0;


unsrgn ed chao ~$ bo as2s
fo
PI= mynum Z3519

\Aroite an 8o51 C pooga mro togg le oll he bifs


of PI Contnousy

I/ To 9g1e PI fouever
#incde < reg 51:h>
Vord mau'n votd)

foo C)

REDMI NOTE 9 PRO MAX


DAVA)
DELUXE
pACE NO.:
DATE:

0 Wroite an &051
8o5| C poogoam to to gg le Ql}

Some detcuy
# In clude <oeg 5e b onrCoV
Vord ma'n CVOLd )

Un siqned tnt X8O boipieis


PI= 0z55s4N
foo C X=03 X4000 Xt) Hme delay
fos Cx=0 X <4000o 3 Xt)

wolte an g01 Cipoogam toto 9g lo


Hhe bts o plpoot kio
ConHnousuy wlh a 250 ms dolay

Vovd mg peri
Voud main cvotd Cunsign ed int) ;
4 whtLO C() I|
Depeds froeve
PL=O55
ms Dety (250) 3
Delay bso)
REDMI NOTE 9 PRO MAX
PAYAL
DELUXE
PAGE NO.:
|DATE:

Notd msDelauy cansig ned ínt iHme)


unsignedint 93
fo CIz0% P iHmeif+ )
foo C=o 3O12753 tt)

LEDS age Connected to bitspÚand P2


Woi te an 805I CC poog0m that Shous a
in bina8y: on ho tEDS:1ydyct
# incde <0g 51:h>
Vord mnan Cvord)

LED=o , // Ctead P2.


while c)

PL 4t/ocoemon t Pl
LED t 3 || in coenen t P2

REDMI NOTEPRO VA
PAYAL
MAY PRO NOTE9 REDMI
ond
PtoitSend mybyfe =P2
9
P] to Send
it
else
foom
Po bqte Glaget
loo) Cmybyte
< C
omybyte
po
pot input pomake | oxf =0Po
mnybyte chas ncdunsig
Cvord) matn Void
byte loo han Loss it Po
foom data CE
Of
geta Dc)to C 618O CnWOlte
DATE:
DELUXÉ MO.: PACE

You might also like