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.
#include <stdio.h>
#include <stdlib.h>
int main ()
{
// int* get_binary_number(int* bit_array, int num, int... (8 Replies)
Hi All,
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.
Thanks,
Deepti.Gaur (3 Replies)
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)
Hi All,
New to this forum (and yes , a newbie in programming..:p)
I have a decimal to binary converter script done this way :
i=$1
bit0=$(( (i & 0x01) > 0 ))
bit1=$(( (i & 0x02) > 0 ))
bit2=$(( (i & 0x04) > 0 ))
bit3=$(( (i & 0x08) > 0 ))
bit4=$((... (6 Replies)
Hi,
I want to convert two hexadecimal numbers to decimal using unix command line.
1cce446295197a9d6352f9f223a9b698
fc8f99ac06e88c4faf669cf366f60d
I tried using
`echo "ibase=16; $no |bc`
printf '%x\n' "1cce446295197a9d6352f9f223a9b698"
but it doesn't work for such big number it... (4 Replies)
Hello,
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 :
data(01000000000000000000110000000000)
thank you..
#include <iostream>
#include <fstream>
#include... (4 Replies)
Hi ,
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)
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
9 Replies
LEARN ABOUT DEBIAN
xpacmdnew
xpacmdnew(3) SAORD Documentation xpacmdnew(3)NAME
XPACmdNew - create a new XPA public access point for commands
SYNOPSIS
#include <xpa.h>
XPA XPACmdNew(char *class, char *name);
DESCRIPTION
Create a new XPA public access point for commands that will share a common identifier class:name. Enter this access point into the XPA name
server, so that it can be accessed by external processes. XPACmdNew() returns an XPA struct.
It often is more convenient to have one public access point that can manage a number of commands, rather than having individual access
points for each command. For example, it is easier to command the ds9 image display using:
echo "colormap I8" | xpaset ds9
echo "scale log" | xpaset ds9
echo "file foo.fits" | xpaset ds9
then to use:
echo "I8" | xpaset ds9_colormap
echo "log" | xpaset ds9_scale
echo "foo.fits" | xpaset ds9_file
In the first case, the commands remain the same regardless of the target XPA name. In the second case, the command names must change for
each instance of ds9. That is, if a second instance of ds9 called DS9 were running, it would be commanded either as:
echo "colormap I8" | xpaset DS9
echo "scale log" | xpaset DS9
echo "file foo.fits" | xpaset DS9
or as:
echo "I8" | xpaset DS9_colormap
echo "log" | xpaset DS9_scale
echo "foo.fits" | xpaset DS9_file
Thus, in cases where a program is going to manage many commands, it generally is easier to define them as commands associated with the
XPACmdNew() routine, rather than as separate access points using XPANew().
When XPACmdNew() is called, only the class:name identifier is specified. Each sub-command is subsequently defined using the XPACmdAdd()
routine.
SEE ALSO
See xpa(7) for a list of XPA help pages
version 2.1.14 June 7, 2012 xpacmdnew(3)