본문/내용
디지털 신호 인코딩
***소스분석****
1. Main부분으로 변수 선언과 기본 출력문과 switch문을 이용해 인코딩 방법을 선택할 수 있는 부분이다.
#include `stdafx.h`
#include
int Binary();
int NRZ_L();
int NRZI();
int Bipolar_AMI();
int Peudoternary();
int Manchester();
int Diff_Man();
#define X 12
int i=0, j=0;
int a, b;
char num[X];
int z;
int main(int argc, char* argv[])
{
printf(`이 프로그램은 디지털 신호를 인코딩한 것입니다.`);
printf(`\\n`);
printf(`\\n양의 전압은 ++ 로 표현 음의 전압은 --입니다.`);
printf(`\\n`);
printf(`\\n0의 전압은 00으로 표현합니다.`);
printf(`\\n`);
printf(`\\n다음 중 어떤 것으로 인코딩할 것인지를 선택하세요`);
printf(`\\n`);
printf(`\\n***1~6를 제외한 모든 수는 모든 경우를 다 나타냅니다.***`);
printf(`\\n`);
printf(`\\n1:NRZ-L, 2:NRZI, 3:Bipolar-AMI`);
printf(`\\n4:Peudoternary 5:Manchester 6:Differential manchester\\n`);
scanf(`%d`, &b);
switch(b){
case 1: NRZ_L();
break;
case 2: NRZI();
break;
case 3: Bipolar_AMI();
break;
case 4: Peudoternary();
break;
case 5: Manchester();
break;
case 6: Diff_Man();
break;
default..