Number systems and Logic Gates 14 Marks

60
1. Number systems and Logic Gates 14 Marks 2. Electronic Spreadsheet (Excel) 13 Marks 3. Database 14 Marks 4. Flow charts & Pseudocode 12 Marks

description

Number systems and Logic Gates 14 Marks. 2. Electronic Spreadsheet (Excel) 13 Marks. 3. Database 14 Marks. 4. Flow charts & Pseudocode 12 Marks Total - 53. Important Areas. Data and information HTML Codes ICT and Society - PowerPoint PPT Presentation

Transcript of Number systems and Logic Gates 14 Marks

Page 1: Number systems and Logic Gates  14 Marks

1. Number systems and Logic Gates 14 Marks

2. Electronic Spreadsheet (Excel) 13 Marks3. Database 14 Marks4. Flow charts & Pseudocode 12 Marks Total - 53

Page 2: Number systems and Logic Gates  14 Marks

1. Data and information2. HTML Codes3. ICT and Society4. Usage of Internet for daily works5. Information systems

Important Areas

Page 3: Number systems and Logic Gates  14 Marks

ixLHd moaO;s

1 oyfha mdofha ixLHd moaO;sh

2 fofla mdofha ixLHd moaO;sh

3 wfÜ mdofha ixLHd moaO;sh

4 odifha mdofha ixLHd moaO;sh

Page 4: Number systems and Logic Gates  14 Marks

oyfha mdofha ixLHd moaO;shixLHdxl - 10 ^0 1 2 3 4 5 6 7 8 9&

Wmßu w.h - 9

Page 5: Number systems and Logic Gates  14 Marks

oyfha mdofha ixLHd moaO;shwm mka;sfha <uqka 36 la isà

3610

3 6

101 100

10 1

10*3 1*6

30 + 6 = 36

Page 6: Number systems and Logic Gates  14 Marks

fofla mdofha ixLHd moaO;shixLHdxl - 2 ^0 1 &

Wmßu w.h - 1

Page 7: Number systems and Logic Gates  14 Marks

oyfha mdofhka fofla mdohg yerùu

ixLHdj 2 ka fnoñka b;sßh .kak

36218 - 029 - 024 - 122 – 021 – 0

1001002

Page 8: Number systems and Logic Gates  14 Marks

3610 fofla mdohg yerùu

64 32 16 8 4 2 120212223242526

0 1 0 0 1 0 0

Page 9: Number systems and Logic Gates  14 Marks

fofla mdofhka oyfha mdohg yerùu2 n, f,i ,shd tl;=j .kak

1001002

1 0 0 1 0 02

202122232425

12481632

32+ 0 +0 + 4 + 0 + 0 = 36

Page 10: Number systems and Logic Gates  14 Marks

wfÜ mdofha ixLHd moaO;shixLHdxl - 8 ^0 1 2 3 4 5 6 7 &

Wmßu w.h - 7

Page 11: Number systems and Logic Gates  14 Marks

oyfha mdofhka wfÜ mdohg yerùu

ixLHdj 8 ka fnoñka b;sßh .kak

295836 - 784 - 4

4478

Page 12: Number systems and Logic Gates  14 Marks

wfÜ mdofhka oyfha mdohg yerùu8 n, f,i ,shd tl;=j .kak

4358

4 3 5 8

808182

1864

256 + 24 + 5 = 285

Page 13: Number systems and Logic Gates  14 Marks

wfÜ mdofhka fofla mdohg

8 = 23

1 – 001 2 - 010 3 - 011 4 - 100

5 – 101 6 - 110 7 - 111 8 - 100

Page 14: Number systems and Logic Gates  14 Marks

wfÜ mdofhka fofla mdohg yerùuiEu ixLhdxlhlau fofla mdofha ixLHdxl 3 ka 3 olajkak3578

3 5 7

011 101 111

0111011112 3578 =

Page 15: Number systems and Logic Gates  14 Marks

1011110112

5738

1 0 1 1 1 1 0 1 1 2

fofla mdofhka wfÜ mdohg yerùumdofha ixLHdxl 3 ka 3 LdKav lr 8 mdohg w.h olajkak

375

Page 16: Number systems and Logic Gates  14 Marks

odifha mdofha ixLHd moaO;shixLHdxl - 16 ^0 1 2 3 4 5 6 7 8 9

A B C D E F &

Wmßu w.h - 15 (F)

Page 17: Number systems and Logic Gates  14 Marks

oyfha mdofhka oyifha mdohg yerùuixLHdj 16 ka fnoñka b;sßh .kak9216

5 - 12 (C)

5C

Page 18: Number systems and Logic Gates  14 Marks

odifha mdofhka oyfha mdohg yerùu16 n, f,i ,shd tl;=j .kak

5E16

5 E16

160161

116

(16*5)+(1*14) = 94

Page 19: Number systems and Logic Gates  14 Marks

odifha mdofhka fofla mdohg yerùuiEu ixLHdxlhlau fofla mdofha ixLHdxl 4 ka 4 olajkak 3 B16

3 11

0011 1011

001110112 3B16 =

Page 20: Number systems and Logic Gates  14 Marks

011110112

7B16

0 1 1 1 1 0 1 1 2

fofla mdofhka odifha mdohg yerùufofla mdofha ixLHdxl 4 ka 4 LdKav lr 16 mdohg w.h olajkak

11 (B)7

Page 21: Number systems and Logic Gates  14 Marks

7B16

1738

0 1 1 1 1 0 1 1 2

odifha mdofhka wfÜ mdohg yerùuodifha mdofhka fofla mdohg yrjd miqj 3ka 3 LdKav lrkak

31

0 1 1 1 1 0 1 1 2

7

Page 22: Number systems and Logic Gates  14 Marks

5768

17E16

1 0 1 1 1 1 1 1 0 2

wfÜ mdofhka odifha mdohg yerùufofla mdohg yrjd miqj 4ka 4 LdKav lr w.hka ,nd .kak

14 (E)1

101 111 110 2

7

Page 23: Number systems and Logic Gates  14 Marks
Page 24: Number systems and Logic Gates  14 Marks
Page 25: Number systems and Logic Gates  14 Marks

Logic Gates

Page 26: Number systems and Logic Gates  14 Marks

AND ;¾lh ixfla; yd m%ldYk weiqßka yÿkd .ksuq

A=

B=F =

01

0101

A BA B F0 0 00 1 01 0 01 1 1

• Boolean m%ldYkhla f,i

wdodk 2lu i;H jQ úg muKla m%;sodkh i;H fõ

Page 27: Number systems and Logic Gates  14 Marks

OR ;¾lh ixfla; yd m%ldYk weiqßka y÷kd .ksuq

A=

B=F =

01

0101

A BA B F0 0 00 1 11 0 11 1 1

+• Boolean m%ldYkhla f,i

wdodk 1la fyda i;H jQ úg m%;sodkh i;H fõ

Page 28: Number systems and Logic Gates  14 Marks

NOT ;¾lh ixfla; yd m%ldYk weiqßka y÷kd .ksuq

A A01 01

• Boolean m%ldYkhla f,i A

Page 29: Number systems and Logic Gates  14 Marks

Logic Gates we;af;a fldfyao 4805

1 6

8 7

Page 30: Number systems and Logic Gates  14 Marks

Gates wdOdrfhka mßm: yd Boolean m%ldYk iu. fudfyd;la

1. my; mrsm: ioyd Boolean m%ldYk ,shkak

AB

? A ?

A

B?

Page 31: Number systems and Logic Gates  14 Marks

A

B

C

?

A

B

C

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

F=A’.B+C’

A’11110000

A’.B00110000

C’10101010

F=A’.B+C’10111010

Page 32: Number systems and Logic Gates  14 Marks

A

B

C

?

?

A

B

C

D

Page 33: Number systems and Logic Gates  14 Marks

A

B

C

F i|yd nQ,shdkq m%ldYkhla ,shkakm%;sodkh 1 ,nd .ekSug wdodkh flfiajsh hq;=o@

F

Page 34: Number systems and Logic Gates  14 Marks

ms<s;=r

A

B

C

3. (A+B) . B.C

(A+B) B.C.

Back

Page 35: Number systems and Logic Gates  14 Marks
Page 36: Number systems and Logic Gates  14 Marks

X.X = X

X.0 = 0

X.X’ = 0

X+X’ = 1

X.1 = X

X+1 = 1

Page 37: Number systems and Logic Gates  14 Marks

EXCEL

Page 38: Number systems and Logic Gates  14 Marks

Formula

=C2*D2

Function

=sum(E2:E6)

Average, Max, Min, Round, Count, CountA

Page 39: Number systems and Logic Gates  14 Marks

Formula

=A$1*B1

C1 iuSlrKh = A1*B1

C2 iuSlrKh = A2*B2

C3 iuSlrKh = A3*B3

C4 iuSlrKh = A4*B4

C5 iuSlrKh = A5*B5

C1 iuSlrKh = A$1*B1

C2 iuSlrKh = A$1*B2

C3 iuSlrKh = A$1*B3

C4 iuSlrKh = A$1*B4

C5 iuSlrKh = A$1*B5

Page 40: Number systems and Logic Gates  14 Marks
Page 41: Number systems and Logic Gates  14 Marks

DATABASE

Page 42: Number systems and Logic Gates  14 Marks
Page 43: Number systems and Logic Gates  14 Marks
Page 44: Number systems and Logic Gates  14 Marks
Page 45: Number systems and Logic Gates  14 Marks
Page 46: Number systems and Logic Gates  14 Marks

Personal

Academic

Fee

Payments

Primary Key

Primary KeyPrimary Key Primary Key

1

1

1

M

1

M

Foreign KeyForeign Key

Page 47: Number systems and Logic Gates  14 Marks

1254 Saman M 12/10/92 Colombo

8578 Nadun M 15/11/92 Kalutara

Page 48: Number systems and Logic Gates  14 Marks

wl=re wvx.= lafIa;% - Wmßu wl=re 255os.=fm< jpk - wl=re 255 jeäb,lalïoskhla fõ,djlauqo,a talliajhxlS%h wxlwjia:d 2la iys; o;a;

Page 49: Number systems and Logic Gates  14 Marks
Page 50: Number systems and Logic Gates  14 Marks
Page 51: Number systems and Logic Gates  14 Marks

DBMS j, jdis

Page 52: Number systems and Logic Gates  14 Marks

ALGORITHMProblem – Find Birthday from ID No.

INPUT –

OUTPUT –

PROCESS –

ID No (925358787V)

Birthday (1992.02.04)

How to find

Page 53: Number systems and Logic Gates  14 Marks

INPUT

OUTPUT

Process ??

Page 54: Number systems and Logic Gates  14 Marks

Take an ID NoTake the first 2 digitsJoin “19” to the begining

Take next 3 digits starting form the3rd digit

If that 3 digit >500 then

3 digit – 500

If that no < 31 then

Display …………………………………

…………………………

Page 55: Number systems and Logic Gates  14 Marks

Dim id As DoubleDim y As StringDim d As IntegerDim dn As Integerid = txtID.Texty = Left(txtID.Text, 2)d = Mid(txtID.Text, 3, 3)If d > 500 Thenlblsex.Caption = "FEMALE"dn = d - 500Elselblsex.Caption = "MALE"dn = dEnd IfIf dn <= 31 Thenlblbday.Caption = "19" & y & ". " & "January" & ". " & dnElseIf dn <= 60 Thenlblbday.Caption = "19" & y & ". " & "February" & ". " & dn - 31ElseIf dn <= 91 Thenlblbday.Caption = "19" & y & ". " & "March" & ". " & dn - 60ElseIf dn <= 121 Thenlblbday.Caption = "19" & y & ". " & "April" & ". " & dn - 91ElseIf dn <= 152 Thenlblbday.Caption = "19" & y & ". " & "May" & ". " & dn - 121ElseIf dn <= 182 Thenlblbday.Caption = "19" & y & ". " & "June" & ". " & dn - 152Else

If dn <= 213 Thenlblbday.Caption = "19" & y & ". " & "July" & ". " & dn - 182ElseIf dn <= 244 Thenlblbday.Caption = "19" & y & ". " & "August" & ". " & dn - 213ElseIf dn <= 274 Thenlblbday.Caption = "19" & y & ". " & "September" & ". " & dn - 244ElseIf dn <= 305 Thenlblbday.Caption = "19" & y & ". " & "October" & ". " & dn - 274ElseIf dn <= 335 Thenlblbday.Caption = "19" & y & ". " & "November" & ". " & dn - 305ElseIf dn <= 366 Thenlblbday.Caption = "19" & y & ". " & "December" & ". " & dn - 335Elselblbday.Caption = "Invalid ID"End IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd IfEnd If

Page 56: Number systems and Logic Gates  14 Marks

Sequence Selection Repetition

Page 57: Number systems and Logic Gates  14 Marks
Page 58: Number systems and Logic Gates  14 Marks
Page 59: Number systems and Logic Gates  14 Marks

Start

X=0, A=1

X<10

A=A+1

X=X+A

YEnd

Display X

N

X A X<10 Out

Page 60: Number systems and Logic Gates  14 Marks

Start

X=0, A=1

X<10

A=A+1

X=X+A

YEnd

Display X

N

BeginX=0, A=1Do while X<10A=A+1X=X+ADisplay XLoopEnd.