9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Is there a fast way to convert a negative decimal value into a signed binary number in bash script ? I've looked a lot on internet but I saw nothing... (For exemple : -1 become 11111111.) (9 Replies)
Discussion started by: Zedki
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Discussion started by: greenworld123
I have script which work fine on particular data.file .
The next feature I want to achieve is to get the decimal equivalent of data to data.
The data looks like this :
#include... (4 Replies)
Discussion started by: emily
4. UNIX for Dummies Questions & Answers
I want to convert two hexadecimal numbers to decimal using unix command line.
I tried using
`echo "ibase=16; $no |bc`
printf '%x\n' "1cce446295197a9d6352f9f223a9b698"
but it doesn't work for such big number it... (4 Replies)
Discussion started by: sudhakar T
5. Shell Programming and Scripting
New to this forum (and yes , a newbie in programming..:p)
I have a decimal to binary converter script done this way :
bit0=$(( (i & 0x01) > 0 ))
bit1=$(( (i & 0x02) > 0 ))
bit2=$(( (i & 0x04) > 0 ))
bit3=$(( (i & 0x08) > 0 ))
bit4=$((... (6 Replies)
Discussion started by: digiteltlc
6. UNIX for Dummies Questions & Answers
Anybody please help me...
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary Coded Decimal) representation. Also, draw its Flow Chart.
This is a unix qn...
plz post algorithm for that :confused: (1 Reply)
Discussion started by: caramba
7. UNIX for Advanced & Expert Users
Is there any command which can convert binary decimal coded values to ascii values...
i have bcd values like below
оооооооооооо0о-- -v -
Pls suggest a way to convert this.
Deepti.Gaur (3 Replies)
Discussion started by: gaur.deepti
I have the following simple code to return a binary number in a array format given an interger and the number of the bits for specifying the interger as binary number.
int main ()
// int* get_binary_number(int* bit_array, int num, int... (8 Replies)
Discussion started by: return_user
9. Shell Programming and Scripting
Could anybody please help me in writing a script in unix for converting a decimal number to binary number. (3 Replies)
Discussion started by: softy