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++

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment