Showing posts with label Byte to bits conversion in Cplusplus. Show all posts
Showing posts with label Byte to bits conversion in Cplusplus. Show all posts

Wednesday, 28 January 2015

Byte to Bits Conversion in C++

Structure of the Problem Requirements  

The Program convert bytes into bits in C++ code. The Bit is the smallest unit of storage and it store 0 or 1. One Byte is equal to 8 bits.

Source Code

#include<iostream>
using namespace std;
int main ()
{
cout<<"\t \t \t LEP Tutorials \n \n \n";
int byte,bits;
cout<<" Enter Number of Bytes : ";
cin>>byte;
cout<<endl;
bits = byte*8;
cout<<" The Number of Bits are : "<<bits<<endl;
return 0;
}

Output of the Program

Byte to Bits Conversion in C++