From 0fa7f11ee61ec394fccc926fdeff839ef51553a8 Mon Sep 17 00:00:00 2001 From: Suchika Sachdeva Date: Mon, 14 Oct 2019 21:45:08 +0530 Subject: [PATCH] my cpp program program to display all 32 bits of a binary number for the decimal number entered by the user --- binaryconv.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 binaryconv.cpp diff --git a/binaryconv.cpp b/binaryconv.cpp new file mode 100644 index 0000000..2b56d1f --- /dev/null +++ b/binaryconv.cpp @@ -0,0 +1,26 @@ +//TO PRINT ALL THE 32 BITS IN BINARY FOR A DECIMAL NUMBER ENTERED BY USER + +#include +using namespace std; +int main() +{ + int s=31; + int n; + cin>>n; + int num; + + + while(s>=0) + { + + num=1<