My Math Forum Adding two BYTEs into a WORD
 User Name Remember Me? Password

 Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion

 January 28th, 2018, 02:34 PM #1 Member   Joined: Jan 2016 From: Uk Posts: 93 Thanks: 2 Adding two BYTEs into a WORD Hi, By using a computer programmers calculator, how do I enter 2x BYTEs and get the answer as a WORD, please? Camerart.
 January 28th, 2018, 02:50 PM #2 Senior Member     Joined: Sep 2015 From: USA Posts: 2,530 Thanks: 1390 can you enter msb shift it left 8 bits (or multiply it by 256) OR (bitwise or) enter lsb ENTER I don't know what your calculator can do.
January 28th, 2018, 05:45 PM   #3
Math Team

Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 14,597
Thanks: 1038

Quote:
 Originally Posted by camerart Hi, a computer programmers calculator
Whadda heck's that? No manual?

January 29th, 2018, 12:40 AM   #4
Member

Joined: Jan 2016
From: Uk

Posts: 93
Thanks: 2

Hi,
D, a computer programmers calculator = a calculator found on Windows computer set to programming.

R,
I tried

'Set to DEC and BYTE or BIN'

1 OR 1 then switched to WORD. =1.

FF or FF worked. Also x256.

Would you clarify 'OR' a bit more please?
C
Attached Images
 Calculator.jpg (27.2 KB, 3 views)

Last edited by camerart; January 29th, 2018 at 12:44 AM.

 January 29th, 2018, 04:39 AM #5 Senior Member   Joined: Apr 2014 From: UK Posts: 954 Thanks: 342 What base are the numbers you want to enter in? if they are hex, just type the MSB followed by the MSByte with the calculator in Hex mode. If your numbers are decimal, type the MSByte, x256 then add the LSByte, you can use any calculator for this unless you then want to convert the result to Hex after. If this is something you need to do more than once, use Excel or google sheets, they handle Hex conversions for you too.
January 29th, 2018, 05:05 AM   #6
Member

Joined: Jan 2016
From: Uk

Posts: 93
Thanks: 2

Quote:
 Originally Posted by weirddave What base are the numbers you want to enter in? if they are hex, just type the MSB followed by the MSByte with the calculator in Hex mode. If your numbers are decimal, type the MSByte, x256 then add the LSByte, you can use any calculator for this unless you then want to convert the result to Hex after. If this is something you need to do more than once, use Excel or google sheets, they handle Hex conversions for you too.
Hi D,
With a calculator I have on the computer (shown in previous post) set to DEC, I can't type say 220, it stops at 22. If i know the HEX, it all work.
C

 January 29th, 2018, 05:34 AM #7 Member   Joined: Jan 2016 From: Uk Posts: 93 Thanks: 2 Hi, I've been playing with the computer calculator, and got confused by '-'s appearing. So I don't think the calculator is for me. In the program I'm programming, I added a little routine, that does this for me. I have to post the results online to get them verified each time, instead of the calculator. Thanks to all. C.
January 29th, 2018, 08:51 AM   #8
Senior Member

Joined: Sep 2015
From: USA

Posts: 2,530
Thanks: 1390

Quote:
 Originally Posted by camerart Hi, D, a computer programmers calculator = a calculator found on Windows computer set to programming. R, I tried 'Set to DEC and BYTE or BIN' 1 OR 1 then switched to WORD. =1. FF or FF worked. Also x256. Would you clarify 'OR' a bit more please? C
the Or button on your calc

January 29th, 2018, 10:03 AM   #9
Member

Joined: Jan 2016
From: Uk

Posts: 93
Thanks: 2

Quote:
 Originally Posted by romsek the Or button on your calc
Hi R,
I understood that for OR I press the OR button, but no matter, I now use the program, as in my last post, thanks.
C.

 Tags adding, bytes, word

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post coax Number Theory 8 August 29th, 2015 04:55 AM caters Algebra 4 November 22nd, 2014 09:02 PM fsswim1 Pre-Calculus 2 September 20th, 2014 03:47 PM DaveJames Algebra 5 March 26th, 2014 06:34 PM alternap18 Elementary Math 2 September 25th, 2010 04:28 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top

Copyright © 2019 My Math Forum. All rights reserved.