60 578
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #15125 in C++ for Zac

Question #15125
Convert 11001100 in two's complement representation (in 8 bits) to a base ten integer.
Expert's answer
#include "iostream.h"
#include "math.h"

void main(){

int c [8] = { 1, 1, 0, 0, 1, 1, 0, 0 };
int a = 0;
for (int i=0; i<=7; i++)
& a += c[i]*pow(2,i);
cout<<a<<"\n";

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions