Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2005, 10:24 AM
Registered User
 
Join Date: Mar 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Making a LRC calculator in Excel?

I am trying to make a Longitudinal Redundancy Check (LRC) calculator in Excel.
I just need to get results for a single line of 6 bytes.

I.E i have 6 byte("31 01 03 00 10 08") And i want to calc the LRC for this.

31+01+03+00+10+08 = 77 ((1001101) in binary)
now i need to negate/2's compliment this and that's where i'm stuck.

Any suggestions?



 
Old March 25th, 2005, 10:31 AM
Registered User
 
Join Date: Mar 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oh should have said (77) is the decimal

 
Old March 25th, 2005, 01:48 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I forget what 2’s compliment is; Can you refresh my memory? What are the steps to apply 2’s compliment to a value? (I had this in school in 1986, but have never used it since...)
 
Old March 25th, 2005, 04:47 PM
Registered User
 
Join Date: Mar 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok to apply 2's, you negate the binary number (1's become 0' and visa versa) then convert back to hex and add 1 (+1). AFAIK. ?





Similar Threads
Thread Thread Starter Forum Replies Last Post
calculator mojtaba rashidi Visual Studio 2005 0 March 17th, 2008 07:29 AM
Making an Excel File expire kklassen VB How-To 1 February 4th, 2008 05:45 PM
OWC making Excel with bar charts mondayisgreat Classic ASP Components 0 March 2nd, 2006 02:24 PM
Calculator DweeLer Other Programming Languages 1 November 18th, 2005 08:13 AM
making calculator help bcmaverik VB.NET 2002/2003 Basics 7 January 6th, 2004 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.