SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Understanding Binary data types
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rock_query
Yak Posting Veteran

52 Posts

Posted - 07/22/2013 :  20:57:23  Show Profile  Reply with Quote
I am trying to understand Binary and varBinary data types.

Examples of binary data types are given on the MS page as

0h202020 and 0h6ABCDEF. The "bi" in binary implies 2. These have more than 2 digits so I am confused as to how these are recognized as binary values.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?

SwePeso
Patron Saint of Lost Yaks

Sweden
30265 Posts

Posted - 07/22/2013 :  21:02:56  Show Profile  Visit SwePeso's Homepage  Reply with Quote
The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

Rock_query
Yak Posting Veteran

52 Posts

Posted - 07/23/2013 :  13:09:38  Show Profile  Reply with Quote
quote:
Originally posted by SwePeso

The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA



Although they are binary represented in hexadecimal, what would the actual binary values look like?
Go to Top of Page

Rock_query
Yak Posting Veteran

52 Posts

Posted - 07/23/2013 :  13:10:22  Show Profile  Reply with Quote
quote:
Originally posted by Rock_query



If anybody can answer these questions, I would appreciate it.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?



Go to Top of Page

MuMu88
Aged Yak Warrior

547 Posts

Posted - 07/23/2013 :  13:13:51  Show Profile  Reply with Quote
0h202020 = 1000000010000000100000 & 0h6ABCDEF = 110101010111100110111101111
quote:
Originally posted by Rock_query

quote:
Originally posted by SwePeso

The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA



Although they are binary represented in hexadecimal, what would the actual binary values look like?


Edited by - MuMu88 on 07/23/2013 13:18:40
Go to Top of Page

MuMu88
Aged Yak Warrior

547 Posts

Posted - 07/23/2013 :  13:39:09  Show Profile  Reply with Quote
http://nookkin.com/articles/computer-science/why-computers-use-binary.ndoc


quote:
Originally posted by Rock_query

quote:
Originally posted by Rock_query



If anybody can answer these questions, I would appreciate it.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?





Go to Top of Page

Rock_query
Yak Posting Veteran

52 Posts

Posted - 07/24/2013 :  17:42:13  Show Profile  Reply with Quote
quote:
Originally posted by MuMu88

0h202020 = 1000000010000000100000 & 0h6ABCDEF = 110101010111100110111101111
quote:
Originally posted by Rock_query

quote:
Originally posted by SwePeso

The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA



Although they are binary represented in hexadecimal, what would the actual binary values look like?





Thank you MuMu88.
Go to Top of Page

Rock_query
Yak Posting Veteran

52 Posts

Posted - 07/24/2013 :  17:55:20  Show Profile  Reply with Quote
quote:
Originally posted by MuMu88

http://nookkin.com/articles/computer-science/why-computers-use-binary.ndoc


quote:
Originally posted by Rock_query

quote:
Originally posted by Rock_query



If anybody can answer these questions, I would appreciate it.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?









Good article. Thank you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000