Noob question: why equ 1<<0 in barebones tutorial

Programming, for all ages and all languages.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Noob question: why equ 1<<0 in barebones tutorial

Post by Solar »

Casm wrote:I must admit that is what I would do. If it was some obscure bit like 27 there might be some point in doing it the other way, but up to about 0x200 I would just write 0x200.
There's where my obsessive-compulsive trait kicks in: If I do it for bit 27, I do it for bit 2 in exactly the same way. 8)

The alternative being writing the integer number plus comment.
Every good solution is obvious once you've found it.
CrypticalCode0
Member
Member
Posts: 81
Joined: Wed Nov 09, 2011 2:21 am
Location: Behind a keyboard located in The Netherlands

Re: Noob question: why equ 1<<0 in barebones tutorial

Post by CrypticalCode0 »

0xc0h or $0xC0 that is 11000000b in a bineary value or 196 decimal why, or did you mean the device at that address?
Post Reply