Decimal To Binary :Bitwise Operator - Online Code

Description

This code converts Decimal to Binary number using Bitwise operator.

Source Code

#include<stdio.h>

#include<conio.h>

count_bits(int n)

{	int i=0;

	for(;n!=0;n=n>>1)

	i++;

	return(i);

}

bin_print(int x,int n_bits)

{	int j;

	printf("\nno. %d in binary=",x);

	f
... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.




Comments

No comment yet. Be the first to post a comment.