Showing posts with label Kathford College. Show all posts
Showing posts with label Kathford College. Show all posts
Access Control List (ACL): Differences between Standard ACL and Extended ACL
- It is a Layer 3 security which controls the flow of traffic from one router to another.
- It is also called as Packet Filtering Firewall.
Types of ACL
- Standard ACL
- Extended ACL
- Named ACL
Standard Access List
- The access-list number lies between 1 - 99.
- Can block a Network, Host and Subnet.
- Two-way communication is stopped.
- All services are blocked.
- Implemented closest to the destination.
Extended Access List
- The access-list number lies between 100 - 199.
- Can block a Network, Host, Subnet and Service.
- One-way communication is stopped.
- Selected services can be blocked.
- Implemented closest to the source.
C Program for Least Square Method (Regression Analysis)
#include<stdio.h>
#include<conio.h>
void main()
{
float x[100],y[100],sumx=0,sumx2=0,sumy=0,sumyx=0,b,a;
int i,n;
printf("Enter n: ");
scanf("%d",&n);
printf("Enter the values:\n");
for(i=0;i<n;i++)
{
printf("Enter x[%d] and y[%d]: ",i,i);
scanf("%f%f",&x[i],&y[i]);
}
for(i=0;i<n;i++)
{
sumx=sumx+x[i];
sumx2=sumx2+x[i]*x[i];
sumy=sumy+y[i];
sumyx=sumyx+y[i]*x[i];
}
//for y=ax+b
b=(sumx2*sumy-sumyx*sumx)/(n*sumx2-sumx*sumx);
a=(n*sumyx-sumx*sumy)/(n*sumx2-sumx*sumx);
printf("\nHence, the required eqn is y = %fx + %f",a,b);
getch();
}
OUTPUT:
Liang-Barsky Line Clipping Algorithm
- For given window with (XWmin, YWmin) and (XWmax, YWmax), the given line has end-points (X1, Y1) and (X2, Y2).
- Calculate
- Calculate pk, qk and rk for k = 1, 2, 3, 4 as:
- If pk=0 for some k, then the line is parallel to clipping boundary. Now test qk:
If all qk ≥ 0 for these k, then some portion of the line is inside.
- For all pk < 0 (i.e. line proceeds from outside to inside the boundary), calculate to determine intersection point with the possibly extended clipping boundary k and obtain a new starting point for the line at u1.
- For all pk > 0 (i.e. line proceeds from inside to outside the boundary), calculate to determine intersection point with the possibly extended clipping boundary k and obtain a new end point for the line at u2.
- If discard the line.
- Else, the line is now between
- Hence,
- Updated points are
8085 ALP: ASCENDING ORDER in a block of DATA
- Suppose, there is an array of ten 8-bit data stored in memory addresses from 2030h to 2039h.
- Starting from 2030h, we compare the data of the first location with that of the second location.
- If the data of the first location is greater than that of the second location, they are swapped.
- Running external loop for 9 times, 8 times, 7 times and so on, we run every internal loop as 9 times, 8 times, 7 times and so on for every corresponding external loop. For e.g. for external loop 9, we run respective internal loop 9 times.
- Doing so, after every external loop, the largest number will be at the last memory location.
MVI C, 09h
AGAIN: MOV D, C
LXI H, 2030h
NEXT: MOV A, M
INX H
CMP M
JC SKIP
MOV B, M
MOV M, A
DCX H
MOV M, B
INX H
SKIP: DCR D
JNZ NEXT
DCR C
JNZ AGAIN
HLT
Computer Networks (CN) LAB - Application Layer Services
Setup Application Layer Services w/ Servers in Packet Tracer - Part 1
Setup Application Layer Services w/ Servers in Packet Tracer - Part 2
C Program to Sort Elements in Lexicographical Order (Dictionary Order) with Input
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char word[12][50],temp[50];
int i,j;
printf("Enter 12 words:\n");
for(i=0;i<12;++i)
gets(word[i]);
for(i=0;i<11;i++)
for(j=i+1;j<12;j++)
{
if(strcmp(word[i],word[j])>0)
{
strcpy(temp,word[i]);
strcpy(word[i],word[j]);
strcpy(word[j],temp);
}
}
printf("\nIn lexicographical order: \n");
for(i=0;i<12;++i)
puts(word[i]);
getch();
}
Differences between 8086 and 8088 Microprocessor
|
8086
|
8088
|
||
|
The instruction Queue is 6 byte long.
|
The instruction Queue is 4 byte long.
|
||
|
In 8086, memory divides into two banks
-even or lower bank
-odd or higher bank
|
The memory in 8088 does not divide into two banks.
|
||
|
The data bus of 8086 is 16-bit wide
|
The data bus of 8088 is 8-bit wide.
|
||
|
It has BHE (bar) signal on pin no. 34 & there is no SSO
(bar) signal.
|
It does not have BHE (bar) signal on pin no. 34 & has
only SSO (bar) signal. It has no S7 pin.
|
||
|
Control pin in 8086 is M/IO (bar).
|
|
||
|
It needs one machine cycle to R/W signal if it is at even
location otherwise it needs two.
|
It needs one machine cycle to R/W signal if it is at even
location otherwise it needs two.
|
||
|
In
8086, all address & data Buses are multiplexed.
|
In 8088, address bus; AD7- AD0 buses
are multiplexed.
|
||
|
It needs two IC 74343 for de-multiplexing AD0-AD19.
|
It needs one IC 74343 for de-multiplexing AD0-AD7.
|
||
|
Maximum supply current 360mA.
|
Maximum supply current 340mA.
|
||
|
Three clock speed: 5, 8, 10 MHz
|
Two clock speed: 5, 8 MHz
|
PROGRAM TO COUNT NUMBER OF 1s IN REGISTER A
MVI C,00H ;COUNTER
FOR 1
MVI B, 8 ;DOWN
COUNTER
;FOR
8-BIT REGISTER A
UP: RAL
JNC PASS
INR C
PASS: DCR B
JNZ UP
HLT
Final Year Project Report
It's the final year project report in 8th semester "Wireless Weather Monitoring System" using Arduino.
8085 Program - Transferring block of data with "Condition"
Q. There are two tables of data stored at 40A1H and 40B1H having 10 data each. Write a program to store the data in the first table to third table starting from address 40C1H if the corresponding data in the first table is greater than the second and table else store FF in the third table.
Program:
LXI B,40A1H ;assume
A1 as the starting number
LXI H,40B1H
LXI D,40C1H
START: LDAX B
CMP M
JC NEXT
STAX D
INX B
INX H
INX D
MOV A,C
CPI ABH ;comparing for 10 values (A1-AA)
JNZ START
JMP LAST
NEXT: MVI A,FFH
STAX D
INX B
INX H
INX D
MOV A,C
CPI ABH
JNZ START
LAST: HLT








