Sponsored Content
Top Forums Shell Programming and Scripting How to get the negate of decimal to binary? Post 302879169 by wisecracker on Wednesday 11th of December 2013 03:13:39 AM
Old 12-11-2013
Are you sure it is a negate or an INVERT?

What you are showing looks like an INVERT...

So just subtract 177 from 255 and voila you have your decimal 78...

BTW is this homework?

Last edited by wisecracker; 12-11-2013 at 04:25 AM.. Reason: Corect my error...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix script for converting a decimal to binary

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
3 Replies

2. Programming

decimal to binary function error

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)
Discussion started by: return_user
8 Replies

3. UNIX for Advanced & Expert Users

Converting Binary decimal coded values to Ascii Values

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)
Discussion started by: gaur.deepti
3 Replies

4. Shell Programming and Scripting

negate search help

Hi, I've tried a lot of negate codes in this forum, but they do not perform what I intended. Please help. inputfile: Paragraph1 contents: die1, die2, die3, pr_name1, pr_name2 pr_name3, pr_name4 Paragraph2 more contents: die1, die2, die3, pr_name1, pr_name2 pr_name3, pr_name4 ... (5 Replies)
Discussion started by: shamushamu
5 Replies

5. UNIX for Dummies Questions & Answers

Decimal to BCD (Binary Coded Decimal)

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
1 Replies

6. Homework & Coursework Questions

Decimal to BCD (Binary Coded Decimal)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary... (2 Replies)
Discussion started by: caramba
2 Replies

7. Programming

Binary to decimal for particular bits

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)
Discussion started by: emily
4 Replies

8. Programming

Urgent help needed.. C++ program to convert decimal to hexa decimal

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)
Discussion started by: greenworld123
1 Replies

9. UNIX for Beginners Questions & Answers

Negative decimal to binary

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
LaTeXML::Number(3pm)					User Contributed Perl Documentation				      LaTeXML::Number(3pm)

NAME
"LaTeXML::Number" - representation of numbers, dimensions, skips and glue. DESCRIPTION
This module defines various dimension and number-like data objects "LaTeXML::Number" represents numbers, "LaTeXML::Float" represents floating-point numbers, "LaTeXML::Dimension" represents dimensions, "LaTeXML::MuDimension" represents math dimensions, "LaTeXML::Glue" represents glue (skips), "LaTeXML::MuGlue" represents math glue, "LaTeXML::Pair" represents pairs of numbers "LaTeXML::Pairlist" represents list of pairs. Common methods The following methods apply to all objects. "@tokens = $object->unlist;" Return a list of the tokens making up this $object. "$string = $object->toString;" Return a string representing $object. "$string = $object->ptValue;" Return a value representing $object without the measurement unit (pt) with limited decimal places. Numerics methods These methods apply to the various numeric objects "$n = $object->valueOf;" Return the value in scaled points (ignoring shrink and stretch, if any). "$n = $object->smaller($other);" Return $object or $other, whichever is smaller "$n = $object->larger($other);" Return $object or $other, whichever is larger "$n = $object->absolute;" Return an object representing the absolute value of the $object. "$n = $object->sign;" Return an integer: -1 for negatives, 0 for 0 and 1 for positives "$n = $object->negate;" Return an object representing the negative of the $object. "$n = $object->add($other);" Return an object representing the sum of $object and $other "$n = $object->subtract($other);" Return an object representing the difference between $object and $other "$n = $object->multiply($n);" Return an object representing the product of $object and $n (a regular number). AUTHOR
Bruce Miller <bruce.miller@nist.gov> COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. perl v5.10.1 2009-06-11 LaTeXML::Number(3pm)
All times are GMT -4. The time now is 05:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy