crossover data

General discussion on mikroC.
Post Reply
Author
Message
saharul
Posts: 489
Joined: 08 Jul 2010 08:11

crossover data

#1 Post by saharul » 09 Jan 2019 08:46

Hi,

Can anybody share idea on How do i write code to make crossover of halves of two binary numbers.

for instance:-

data1= '00001111'
data2= '11110000'

the final value after crossover will be

data1='00000000'
data2='11111111'

i tried below code but no success

Code: Select all

res = strncpy(data1,data2,4);
      // memcpy(data1,data2, 2);
Many thanks

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: crossover data

#2 Post by stefan.filipovic » 10 Jan 2019 12:41

Hi,

I believe that you have been answered in this topic:
viewtopic.php?f=13&t=74000&p=296405#p296405

Kind regards,
Stefan Filipović

saharul
Posts: 489
Joined: 08 Jul 2010 08:11

Re: crossover data

#3 Post by saharul » 11 Jan 2019 01:29

Many Thanks Stefan

:D :D :D

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: crossover data

#4 Post by stefan.filipovic » 11 Jan 2019 10:56

Hi,

You're welcome.

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroC General”