<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/626b631d1e41a87e8a9b7dba/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/626b631d1e41a87e8a9b7dba/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">EXPERIMENT</div><div class="t m0 x2 h4 y3 ff1 fs0 fc0 sc0 ls0 ws0">AIM:<span class="ff2"> To analyse the hardware parameters (code length and execution time)<span class="_ _0"></span> using arm </span></div><div class="t m0 x2 h3 y4 ff1 fs0 fc0 sc0 ls0 ws0">CODE:</div><div class="t m0 x2 h5 y5 ff3 fs0 fc0 sc0 ls0 ws0">#include<LPC214x.H></div><div class="t m0 x2 h5 y6 ff3 fs0 fc0 sc0 ls0 ws0">unsigned char PT[8]={"PlainTxt"};</div><div class="t m0 x2 h5 y7 ff3 fs0 fc0 sc0 ls0 ws0">unsigned char CT[8],DT[8];</div><div class="t m0 x2 h5 y8 ff3 fs0 fc0 sc0 ls0 ws0">int main()</div><div class="t m0 x2 h5 y9 ff3 fs0 fc0 sc0 ls0 ws0">{</div><div class="t m0 x2 h5 ya ff3 fs0 fc0 sc0 ls0 ws0">unsigned char i;</div><div class="t m0 x2 h5 yb ff3 fs0 fc0 sc0 ls0 ws0">//Encryp-on</div><div class="t m0 x2 h5 yc ff3 fs0 fc0 sc0 ls0 ws0">for (i=0;i<4;i++)</div><div class="t m0 x2 h5 yd ff3 fs0 fc0 sc0 ls0 ws0">{</div><div class="t m0 x2 h5 ye ff3 fs0 fc0 sc0 ls0 ws0">CT[i] = PT[i*2];</div><div class="t m0 x2 h5 yf ff3 fs0 fc0 sc0 ls0 ws0">CT[i+4] = PT[(i*2)+1];</div><div class="t m0 x2 h5 y10 ff3 fs0 fc0 sc0 ls0 ws0">}</div><div class="t m0 x2 h5 y11 ff3 fs0 fc0 sc0 ls0 ws0">//Decryp-on</div><div class="t m0 x2 h5 y12 ff3 fs0 fc0 sc0 ls0 ws0">for (i=0;i<4;i++)</div><div class="t m0 x2 h5 y13 ff3 fs0 fc0 sc0 ls0 ws0">{</div><div class="t m0 x2 h5 y14 ff3 fs0 fc0 sc0 ls0 ws0">DT[i*2] = CT[i];</div><div class="t m0 x2 h5 y15 ff3 fs0 fc0 sc0 ls0 ws0">DT[(i*2)+1] = CT[i+4];</div><div class="t m0 x2 h5 y16 ff3 fs0 fc0 sc0 ls0 ws0">}</div><div class="t m0 x2 h5 y17 ff3 fs0 fc0 sc0 ls0 ws0">return 0;</div><div class="t m0 x2 h5 y18 ff3 fs0 fc0 sc0 ls0 ws0">}</div><div class="t m0 x2 h3 y19 ff1 fs0 fc0 sc0 ls0 ws0">EXPLANATION:</div><div class="t m0 x2 h4 y1a ff1 fs0 fc0 sc0 ls0 ws0"> <span class="ff2">Here, rail fence cipher have been taken to calculate the<span class="_ _0"></span> code length and execution time</span></div><div class="t m0 x2 h3 y1b ff1 fs0 fc0 sc0 ls0 ws0">SAMPLE INPUT: </div><div class="t m0 x2 h4 y1c ff1 fs0 fc0 sc0 ls0 ws0"> <span class="ff2">System clock frequency = 60 MHz</span></div><div class="t m0 x2 h3 y1d ff1 fs0 fc0 sc0 ls0 ws0">CALCULATION : </div><div class="t m0 x2 h4 y1e ff2 fs0 fc0 sc0 ls0 ws0">Start up file– 982 states (clock cycles) </div><div class="t m0 x2 h4 y1f ff2 fs0 fc0 sc0 ls0 ws0"> // <span class="ff4">the no of clock cycles taken to execute<span class="_ _0"></span> start up file</span></div><div class="t m0 x2 h4 y20 ff2 fs0 fc0 sc0 ls0 ws0">Total program – 1137 states (clock cycles) </div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div>
</body>
</html>