Questions tagged [number-systems]

Anything related to number systems, i.e. the way of representing numbers (the abstract mathematical entities) as finite sequences of symbols. Usually this tag is relevant on questions involving conversion from the representation in a number system to another (e.g. from decimal to binary).

106 questions
0
votes
0 answers

Instruction of addition modulo 255 in openRISC simulator - or1ksim

I need to write instruction of addition modulo 255 to or1ksim, which is an openRISC simulator. At the first I learnt something about this processor/simulator, then I wrote program HelloWorld in C, compile it using gcc and debbuging according to…
0
votes
0 answers

Convert from base10 to base8

Converting from base-10 to base-8 is a little trickier, but still straightforward. We basically have to reverse the process from above. Let's start with an example: 150 of base-10. We first find the largest power of 8 that is smaller than…
Amit
  • 391
  • 3
  • 15
0
votes
3 answers

Why 0A0B0C0D is a 32-bit word/number?

When discussing about the endian, the instructor gave us a word 0A0B0C0D in hexadecimal, and why would it be a 32-bit word? Thanks.
user4235677
0
votes
2 answers

How does System.out.println() works on binary data?

I am unable to understand the output of the below code package beg; import java.util.*; import java.io.*; public class Hell { public static void main(String[] args) { System.out.println(10+010); //Prints 18 …
Frosted Cupcake
  • 1,909
  • 2
  • 20
  • 42
0
votes
1 answer

Is there any freeware tool that can convert fractional values of various numeral systems to each other?

I have already searched Google and I am finding no tool to convert fractional values of various numeral system into each other. Can anyone hive me a hand? I need a freeware executable for WindowsXP.
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
3 answers

binary conversion using 3 figures system 0,1,2

Suppose system is evolved by extraterrestrial creatures having only 3 figures and they use the figures 0,1,2 with (2>1>0) ,How to represent the binary equivalent of 222 using this? I calculated it to be 22020 but the book answers it 11010 .how…
Khan
  • 185
  • 1
  • 4
  • 15
0
votes
1 answer

subtracting a negative 2's complement

I have two 2's complement signed binary numbers and want to subtraction them (assuming an 8-bit subtractor) 1001 0110 1000 0001 what would be the operation to find the difference and why/whynot is there an overflow
user47835
  • 159
  • 2
  • 13
0
votes
0 answers

JavaScript - convention from it-IT - Italian (Italy) number system to en-US - English (United States) number system

I have to convert the Italian number system to English number system by JavaScript and I have write below code the achieve this. function fnNumSysConvertor(number) { if(number.toString().lastIndexOf(",") == -1 && number.toString().indexOf(".")…
SK.
  • 4,174
  • 4
  • 30
  • 48
0
votes
1 answer

Converting files from Hexadecimal, binary, octal

I am in a design phase of an editor project. I always store files in binary format. However the requirement is, user must be able to click a button "Display Format" and the format of the file content should change from Binary to Hex, Decimal and…
user2495173
  • 311
  • 2
  • 5
  • 17
0
votes
7 answers

python hex to decimal using for loop

import math def hexToDec(hexi): result = 0 for i in range(len(hexi)-1,-1,-1): if hexi[i] == 'A': result = result + (10 * math.pow(16,i)) elif hexi[i] == 'B': result = result + (11 * math.pow(16,i)) …
user3243566
  • 3
  • 1
  • 2
0
votes
1 answer

What is the best way to store binary data in a number?

I am wondering if it is possible to store binary data in a number, and how the most binary data possible can be stored in a single number. For example, let's say I want to store the following text in a number: Lorem ipsum dolor sit amet,…
Razick
  • 744
  • 2
  • 9
  • 28
0
votes
1 answer

what is a negative 17 in hexadecimal value

I am a little bit confused in converting -17 into hex. I know that 17 in hex is 11h but answer is in weird form. -17= 17=11h Answer is 0ffefh. I don't understand how this is done. can anyone show me the steps thanks.
ngoche
  • 65
  • 2
  • 8
0
votes
4 answers

Octal to binary conversion confusion

I have a code in C++ which convert 2 digits octal number to binary number. For testing validity of the code I used several online conversion site like this and this When I enter 58 or 59 in as an octal value it says invalid octal values but when I…
user2241865
  • 113
  • 4
  • 14
0
votes
3 answers

What is 2's Complement Number?

What is 2's Complement Number? Why do we take 1's Complement and add 1 to it? Why don't we subtract 1 after taking 1's Complement? Why do computers use 2's Complement?
0
votes
2 answers

.NET Conversion of very large numbers to different number base

Is there any way to convert very large binary, decimal and hexadecimal numbers to each other? I have to use it to simulate addressing process up to 256 bits. I want to do the following conversions (and if it's possible, store them in one…
elaspog
  • 1,635
  • 3
  • 21
  • 51