answersLogoWhite

0

write a c program that takes a binary file as input and finds error check using different mechanisms.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a c program to check whether a number is binary or not?

#include<stdio.h> void main() { int n; clrscr(); printf("enter a no."); scanf("%d",&n); if(n%10==0n%10==1) printf("yes binary"); else printf("not binary"); getch(); } }


Conversion of decimal to binary in fortran?

This is not a perfect program, but it will get you started in the right direction. Works for any INTEGER up to "some" power of 2 (decimals kill the program). PROGRAM binary IMPLICIT NONE INTEGER remainder, quotient, n, int_input, answer REAL input, dec_input WRITE(*,*) 'Input a number to convert to binary' READ(*,*) input int_input = input dec_input = input - int_input dec_input = abs(dec_input) quotient = abs(input) DO WHILE (dec_input==0) n = 0 answer = 0 DO WHILE (quotient>1) remainder = mod(quotient,2) quotient = quotient/2 answer = answer+remainder*10.**n n = n+1 END DO IF (input<0) answer = -answer answer = answer + quotient*10.**n WRITE(*,"(a,i31)") 'Your answer in binary is:',answer END DO END PROGRAM binary


Why are few programs written in binary form?

The lower-level the language, the harder it is to write programs in. It takes a long time to write a program in machine language...and it is way more trouble than writing it in an abstracted language.


How do you write 19 in binary numbers?

First let's write it as a sum of powers of two. This will make it easier to write as a binary number. 19=16+2+1 This can be written: 19=16*1+8*0+4*0+2*1+1*1 So the binary form is: 10011