목차
◎.요구 조건.
◎.요구 조건에 따른 구현 단계.
◎.프로그램 설명.
◎.실행방법.
◎.각각의 함수 설명.
◎.구조도.
◎.소스
◎.결과 화면
◎.요구 조건에 따른 구현 단계.
◎.프로그램 설명.
◎.실행방법.
◎.각각의 함수 설명.
◎.구조도.
◎.소스
◎.결과 화면
본문내용
ode(node1,node2,node1->minterm[0],node1->minterm[1],\'-\',node1->minterm[3]);
node1->check = \'v\';
node2->check = \'v\';
}
else if((node1->minterm[0] == node2->minterm[0])&&(node1->minterm[1] == node2->minterm[1])&&(node1->minterm[2] == node2->minterm[2])&&(node1->minterm[3] != node2->minterm[3])){
insert_passnode(node1,node2,node1->minterm[0],node1->minterm[1],node1->minterm[2],\'-\');
node1->check = \'v\';
node2->check = \'v\';
}
}
void free_pi()
{
pi_node *temp;
while(pi_ptr){
temp = pi_ptr;
pi_ptr = pi_ptr->link;
free(temp);
}
pi_ptr = NULL;
}
void pass_implicant()
{
implicant *temp,*temp1,*temp2;
if(p_ptr){
temp1 = p_ptr;
g_ptr = p_ptr;
p_ptr = NULL;
while(temp1->link){
temp2 = temp1->link;
while(temp2){
comp_im(temp1,temp2);
temp2 = temp2->link;
}
temp1 = temp1->link;
}
temp2 = g_ptr;
while(temp2){
print_pinode(temp2);
temp2 = temp2->link;
}
while(g_ptr){
temp = g_ptr;
g_ptr = g_ptr->link;
if(temp->check == \'v\')
free(temp);
else {
if(prime_ptr){
temp1 = prime_ptr;
while(temp1->link){
temp1 = temp1->link;
}
temp->link = NULL;
temp1->link = temp;
}
else {
temp->link = NULL;
prime_ptr = temp;
}
}
}
}
}
void print_implicant()
{
implicant *temp;
temp = p_ptr;
while(temp){
print_pinode(temp);
temp = temp->link;
}
}
void insert_pinode(int minterm)
{
int i;
implicant *node;
implicant *temp;
temp = (implicant*)malloc(sizeof(implicant));
for(i=0;i<16;i++)
temp->index[i] = 100;
temp->check = \' \';
temp->minterm[0] = (minterm & 8) ? 1: 0;
temp->minterm[1] = (minterm & 4) ? 1: 0;
temp->minterm[2] = (minterm & 2) ? 1: 0;
temp->minterm[3] = (minterm & 1) ? 1: 0;
temp->index[0] = minterm;
if(p_ptr){
node = p_ptr;
while(node->link){
node = node->link;
}
temp->link = NULL;
node->link = temp;
}
else {
temp->link = NULL;
p_ptr = temp;
}
}
◎.결과 화면
결과 화면에서처럼 PI를 출력하고 ‘v\'체크를 하며 체크가 안된부분이 PI입니다.
node1->check = \'v\';
node2->check = \'v\';
}
else if((node1->minterm[0] == node2->minterm[0])&&(node1->minterm[1] == node2->minterm[1])&&(node1->minterm[2] == node2->minterm[2])&&(node1->minterm[3] != node2->minterm[3])){
insert_passnode(node1,node2,node1->minterm[0],node1->minterm[1],node1->minterm[2],\'-\');
node1->check = \'v\';
node2->check = \'v\';
}
}
void free_pi()
{
pi_node *temp;
while(pi_ptr){
temp = pi_ptr;
pi_ptr = pi_ptr->link;
free(temp);
}
pi_ptr = NULL;
}
void pass_implicant()
{
implicant *temp,*temp1,*temp2;
if(p_ptr){
temp1 = p_ptr;
g_ptr = p_ptr;
p_ptr = NULL;
while(temp1->link){
temp2 = temp1->link;
while(temp2){
comp_im(temp1,temp2);
temp2 = temp2->link;
}
temp1 = temp1->link;
}
temp2 = g_ptr;
while(temp2){
print_pinode(temp2);
temp2 = temp2->link;
}
while(g_ptr){
temp = g_ptr;
g_ptr = g_ptr->link;
if(temp->check == \'v\')
free(temp);
else {
if(prime_ptr){
temp1 = prime_ptr;
while(temp1->link){
temp1 = temp1->link;
}
temp->link = NULL;
temp1->link = temp;
}
else {
temp->link = NULL;
prime_ptr = temp;
}
}
}
}
}
void print_implicant()
{
implicant *temp;
temp = p_ptr;
while(temp){
print_pinode(temp);
temp = temp->link;
}
}
void insert_pinode(int minterm)
{
int i;
implicant *node;
implicant *temp;
temp = (implicant*)malloc(sizeof(implicant));
for(i=0;i<16;i++)
temp->index[i] = 100;
temp->check = \' \';
temp->minterm[0] = (minterm & 8) ? 1: 0;
temp->minterm[1] = (minterm & 4) ? 1: 0;
temp->minterm[2] = (minterm & 2) ? 1: 0;
temp->minterm[3] = (minterm & 1) ? 1: 0;
temp->index[0] = minterm;
if(p_ptr){
node = p_ptr;
while(node->link){
node = node->link;
}
temp->link = NULL;
node->link = temp;
}
else {
temp->link = NULL;
p_ptr = temp;
}
}
◎.결과 화면
결과 화면에서처럼 PI를 출력하고 ‘v\'체크를 하며 체크가 안된부분이 PI입니다.
추천자료
논리회로 학습계획안
비휘발성 메모리중 FRAM과 MRAM의 비교
컴퓨터 발달의 역사
반도체 제조공정
디지털회로 설계의 기초 4장 연습문제 풀이
부울대수와 논리게이트 문제&정답
반가산기, 전가산기, 이진병렬가산기, BCD가산기
디지털 논리회로 학습지도안(2차시)
기본 디지털 실험-Sequence Recognizer- 순서인식기 설계
[공업][중화학공업][철강공업][재래공업][공업화공법]공업과 공업발달, 공업과 중화학공업, ...
[ 대학레포트 ]디멀틱플렉서를 이용한 대중 출력 조합 논리 회로의 설계
[ 대학레포트 ]논리회로 간소화 - BCD 무효코드검출기에 대한 진리표, 카르노맵을 이용한 표...
디지털회로설계(비교기회로)