84prakash
Newbie level 3
hi
if we declare a int variable in pic16f877 we know 16 bits are allocated to that variable. for example if i'm assigning 3 variables for date month and year viz DATE MONTH YEAR totally 48 bits will be allocated. In variables MONTH highest value will be 12(0000000000001100). in the variable DATE highest value will be 31(0000000000011111). totally 23 bits are wasted. if i want to store 100 dates more memory will be wasted. My question is how to define a variable whose bit length is 4 or 5. pls help me to solve my long time doubt. if not in pic16f can we declare like that in ARM7. pls tell the instructions
if we declare a int variable in pic16f877 we know 16 bits are allocated to that variable. for example if i'm assigning 3 variables for date month and year viz DATE MONTH YEAR totally 48 bits will be allocated. In variables MONTH highest value will be 12(0000000000001100). in the variable DATE highest value will be 31(0000000000011111). totally 23 bits are wasted. if i want to store 100 dates more memory will be wasted. My question is how to define a variable whose bit length is 4 or 5. pls help me to solve my long time doubt. if not in pic16f can we declare like that in ARM7. pls tell the instructions