Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
what you mean by binary to decimal?
is the software matlab?
- - - Updated - - -
is the software matlab?
HI THEREHow to convert a binary image (8 bits) into decimal image? Would it be bin2dec() is the function to be used? Any example please?
Thank you in advance for your help.
// This is just a simple converter that takes a binary string and converts it to a char array
#include <string.h>
#include <math.h>
int i = 0;
int length = strlen(BINARYINPUT) / 8; // I have no clue how your original data is saved.
unsigned char output[length];
unsigned char out = 0x00; // It looks trashy to me if a loop declares a value every iteration
do {
out = bin2dec(BINARYINPUT.substr(i*8,i*8+8)); // 8 chars per hex value, so pos of the substring is i*8, length is i*8+8
output[i] = out;
i++;
} while (i < length);