if you're using Java the Integer class has alot of methods that can easely convert to byte
for example:
int s;
Integer i = new Integer (s);
i.byteValue() // returns the same number but as a byte
i.toBinaryString(s) // returns the binary value as a string varibale
otherwise you can construct a loop that constructs a varaible using isOdd and finction ex :
public int binaryVariable (int i){
int m = 1; // increments with each variables
int n = 0; // varies between 0 and 1;
int a =0; // the outcoming number;
while (i>0){
if (isOdd (i)) n =1; // I'm afraid you have to make the isOdd function
else n = 0;
a +=n*m;
m*=10;
i/=2;
}
return a;
}
//hope this has helped
convert 1101 to decimal
27 = 11011
write an assembly language program to implement a stack. START: LXI SP,STACK ;initialize stack pointer LXI H,BINBYT ;point HL index to where binary number is stored MOV A,M ;transfer byte LXI H,OUTBUF ;point HL index to output-buffer memory CALL BINBCD HLT BINBCD: MVI B,100 ;load 100 into register B (power of ten holding register) CALL BCD ;call conversion for BCD3 MVI B,10 ;load 10 into register B CALL BCD ;call conversion for BCD2 MOV M,A ;store BCD1 RET
program that take three decimal number as input and find the largest among them in assembly language
write a c++ program to convert binary number to decimal number by using while statement
192.168.1.1
prompt x floor(x + .5) -> x disp x
You can always write a numerical division expression as a decimal.
It is a number expressed in decimal form.
It already is decimal expression of one-third.
There is no expression for a number with what appear to be two decimal points!
40.32 degrees is a decimal expression
convert 1101 to decimal
a gps.
340 decimal British Pounds converts to 34,000 decimal British Pence. 340 predecimal British Pounds converts to 81,600 predecimal British Pence.
1001 0111 base 2
0.0146%